So im kind of confused as to why the scope on this changes the outcome.

If I run this code:

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

it works properly, but if i run this code:

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

it fails to work right. The only difference being the scope of the else statement at the bottom.

I dont understand why this is happening.