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

This is my code for the problem. I am having problems understanding why it gives False instead of true when the input is . Could someone please explain where I have an error in my logic