<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.>

https://www.codecademy.com/courses/python-intermediate-en-rCQKw/0/6?curriculum_id=4f89dab3d788890003000096

<In what way does your code behave incorrectly? Include ALL error messages.>

I am trying to make my own code, which I believe is important to the learning process, rather than come to the QnA whenever I get stuck. Alas, I needed to get some help on this one.

<What do you expect to happen instead?>

No matter the number I put in, it prints False unless I input 0 which then returns True. I was hoping someone could explain why this is exactly.

def is_prime(x):

for n in range(0,x):

if n%2==0:

return False

elif x == 0:

return False

elif x <= 1:

return False

break

else:

return True

print is_prime(3)

```
This is a similar code that I found that works:
```

def is_prime(x):

if x < 2:

return False

for n in range (2,x):

if (x % n) == 0:

return False

return True

```
I just wanted to know what the exact difference is.
<do not remove the three backticks above>
```