is_prime

Why does prime 2 give a return value of "none"?

I know that removing the last else and placing the "return True" under the "for" will make this work, but I don't understand why the else statement doesn't catch prime 2?

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