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

# Why does this fail at prime(2)?

u can just sum up the first if in just 1 condition

thats what i did tho (notice the indents)

def is_prime(x):

____if x <= 1:

________return False

____if x == 2:

________return True

____for n in range(2,x-1):

________if x % n == 0:

____________return False

____return True

EDIT: sorry i forgot the "2" part , thanks @ropnog