Python Program to Check prime number
num = int(input("Enter a number: "))
if num > 1:
for i in range(2, num):
if num % i == 0:
print(f"{num} is not a prime number.")
break
else:
print(f"{num} is a prime number.")
else:
print(f"{num} is not a prime number.")
#source code --> clcoding.com
0 Comments:
Post a Comment