Make a program to check a number is prime or not in python
num = int(input("Enter the number: "))
prime = True
for i in range(2,num):
if(num/i == 0):
prime = False
break
if prime:
print("This is a prime number")
else:
print("This is not a prime number")
Comments
Post a Comment