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

I'm not sure where I went wrong, it says that it's failing on is_prime(9) so it must have slipped through my first condition which would check for square roots. My issue is that I cant see how.