#/usr/bin/python
def prime_check(n):
bitval = False
for x in range(2,n):
if n % x == 0:
bitval = True
break
if (bitval):
print ("{} is not a prime number".format(n))
else:
print ("{} is a prime number".format(n))
for i in range(1,10):
prime_check(i)
A technology and programming blog to share knowledge and solutions to problems came across
Comments
Post a Comment