Oops, try again. Your function fails on is_prime(0). It returns None when it should return False.
It’s supposed to figure out if it’s prime or not, but I can’t see why it’s not working. Am I getting the logic wrong or syntax or is it something else entirely?
def is_prime(x): for n in range(2, x-1): if x % n == 0: return False else: return True