Practice makes perfect 6/15


#1



https://www.codecademy.com/fr/courses/python-intermediate-fr-FR-py0yl/0/6?curriculum_id=5370f030fed2a866a2000001#


`python

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

def est_premier(x):
if x < 2:
return False
else:
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
None

Thank you for your help.
`


#2

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