I'm getting "Oops, try again. Your function fails on is_prime(0). It returns True when it should return False."
I must have my math wrong somewhere but It should (obviously) be returning false. but It's returning true. I've even gone so far as to add a specific if statement to the function to return False if 0 is entered as x and it still spits out True. Side note, it's not printing what I say when I say print " Not a Prime" or "It's a Prime".
def is_prime(x): for n in range(2 , x - 1): if x == 0: return False elif x%n == 0: return False print "Not a prime!" else: return True print "It's a Prime!" print is_prime(0)