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

This is the working code I came up with after consulting the forum.

My question is this, why is the last return True formatted like that as opposed to my previous code:

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

If I could have your feedback it would be appreciated, as I'm sure I'm missing some concept that will hold me back later.