my code is giving me issues saying it returns 9 as a prime I have been looking at this for three days help much appreciated:

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