The logic is correct, yet for input 2, it would return None in the answer instead of True. What's the problem?

I expected it would run properly, but why isn't it?**UPDATE**: the code below is now fine..

```
def is_prime(x):
if x<2:
return False
else:
for n in range(2,x/2):
if (x%n) == 0:
return False
return True
print is_prime(input())
```