I have looked through the code many times and the logic seems to make sense, but this keeps popping up "Your function fails on is_prime(9). It returns True when it should return False."

What am I doing wrong?

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