when trying to create my function is_prime(x) it keeps telling me that I didn't create a function.. what is wrong here?
def is_prime(x): for n in range(2,x): if n % x = 0: print "not a prime" return False break else: return True
it returns an
Oops, try again. Did you create a function called is_prime? Your code threw a "global name 'is_prime' is not defined" error.
anyone got any insight into why it does this?