Hello! could i ask where there's any error in my code for testing prime numbers?
cos i tried testing 21 and 49, and they were tested as prime.
thanks!
import math
y = int(raw_input("Please input a number: "))
if y < 2:
print "It is not a prime number."
elif y == 2:
print "It is a prime number."
else:
for i in range (2,int (y+1)):
if y%i == 0:
print "It is not a prime number."
break
else:
print "It is a prime number."