here’s my code:
def is_prime(x): for n in range(x, 2, x-1): if x % n == 0 and n != x and n != 1 and n != 0: return True else: return False
That’s the error message:
Your function fails on is_prime(0). It returns None when it should return False.
I do not understand what’s wrong with the code.
Can you explain me?
Thanks in advance!