I keep getting an error message with is_prime(4) returns True when it should return False

is_prime(4) should be False sense 2 % 4 = 0

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