Else has to go outside the loop. So you get
for/else instead of
This way, when the number is not a prime number, the if condition will be true at some point in the loop, return False and break the loop. Everything cool
If the number is a prime number, the if condition will never evaluate to true, the loop finishes running,
else will return True, you now successfully determined a number is a prime number.