to find whether the given number is prime number or not
its python..
Answers
Answered by
0
Answer:
def isPrime(num):
for i in range(2 , num):
if(num % i == 0):
return False;
else:
return True;
num = int(input("Enter a number:"))
if(isPrime(num)):
print(num , "is a prime number")
else:
print(num , "is not a prime number")
Explanation:
Similar questions