Is prime?!?!?!




this worked for me-
I don't quite understand why you put the while function inside if function.

def is_prime(x):
if x<2:
return False
elif x==2:
return True
for n in range(2,x):
if x%n==0:
return False
return True


This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.