My code is failing on Is_Prime(9), it's returning true instead of false. I can't seem to understand why.

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