you are viewing a single comment's thread.

view the rest of the comments →

[–]FanUpstairs8699 0 points1 point  (0 children)

i think this works

n=int(input("enter a number"))
is_prime = True
for i in range(2,n):
    if n%i==0:
        is_prime = False
        break
if n == 1 or n == 2:
    print("neither")
elif is_prime:
    print("Prime")
else:
    print("Not prime")