And what's the problem? Your function returns `None`

for `2`

, and obviously, it should return `True`

.

Why it returns `None`

? Let us assume that `x = 2`

.

Is `2 > 1`

? Yes, so now we are in the `if`

block.

This code -> `for n in range(2,x)`

with `x = 2`

is `for n in range(2,2)`

. This basically means "set `n`

to `2`

and execute block of code as long as `n`

is lower than `2`

and increment `n`

by `1`

after every iteration". So... block of this `for`

will not be executed, not even once, because `2`

is not lower than `2`

, right?

But the problem is kind of deeper, let us assume now that `x = 5`

.

Is `x > 1`

? Sure. So again, we are in the block of `if`

.

```
for n in range(2,5):
if (5 % n == 0):
return False
```

Let us check what happens in the `for`

loop:

```
# n = 2
5 % 2 = 1
# n = 3
5 % 3 = 2
# n = 4
5 % 4 = 1
```

So this code will not return `False`

, but it also does not return `True`

. So it returns nothing, `None`

.

In some place in your code you need to return `True`

.