python - Write a program to test whether a given number is prime or not.?(without goto) Email ThisBlogThis!Share to TwitterShare to Facebook Reactions: Labs 1 Comment
a=int(raw_input("enter a number"))
ReplyDeleteif a>1:
for i in range(2,a/2):
if a%i==0:
print "not prime"
break
else:
print "prime"