Practice makes perfect 6/15



This is my code and i don't see what's wrong :

def est_premier(x):
if x < 2:
return False
for n in range(2, x):
if x % n == 0:
return False
return True
print est_premier(5)

**Oups, merci de réessayer. Votre fonction a échoué sur 0 comme entrée car votre fonction indique "'bool' object is not callable" error. **

And in the console : True

Thank you for your help.


This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.