I am doing exercise 6. (is_prime), and I kept having trouble with my code so I ended up looking at theirs and it was exactly the same except for the fact that the last line was just: return true, instead of

else:

return True

why does this matter, and why don’t I need an else statement?

this was their code:

```
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 was my 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
```