The code returns the correct value on every value of x except for x = 9.

I get:

Oops, try again. Your function fails on is_prime(9). It returns True when it should return False.

the function works correctly for all other values. Prime numbers like 2, 5 or 11 or 521 return True like they should and non prime numbers like 4 or 18 return False like they should. It is just 9 That doesn't work for as far as I can tell.

```
def is_prime(x):
if x <= 1:
return False
elif x <= 3:
return True
else:
for n in range(2,x):
if x % n == 0:
return False
else:
return True
```