<PLEASE USE THE FOLLOWING TEMPLATE TO HELP YOU CREATE A GREAT POST!>
<Below this line, add a link to the EXACT exercise that you are stuck at.>
<In what way does your code behave incorrectly? Include ALL error messages.>
Why does prime 2 give a return value of “none”?
I know that removing the last else and placing the “return True” under the “for” will make this work, but I don’t understand why the else statement doesn’t catch prime 2?
<What do you expect to happen instead?>
if x <= 0:
elif x == 1:
elif x > 1:
for n in range(2, x):
if x % n == 0:
<do not remove the three backticks above>