Oops, try again. Your function fails on is_prime(9). It returns True when it should return False.

Hi. I do not understand why VARIANT 1 doesn't work if i=3? It should return False because 9 or 15 % 3 == 0. In VARIANT 2 I've changed the place of else statement and it starts work correctly. I understand why Variant 2 works, but still do not understand why variant 1 does not. I ve printed the output with

for i in range (0, 16):

print i

print is_prime(i)

but still do not understand. Please, someone explain me

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