All my error messages return is_prime(0) fails or is_prime(2) returns False when it should be true.

I can see why this happens. Due to my function x % n == 0. I have also tried (x / n) == 0.

Is my problem my function? or my whole program?

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