My code does not work for -7. if anyone could either guide me in the fight direction, or share a working code, thank would be much appreciated. I learn beest from seeing other people's work

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