Python 8 2 5 french version Still Cannot Validate (no answer in the french forum)


#1



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


Oups, merci de réessayer. Votre fonction a échoué sur 1 comme entrée car votre fonction indique "global name 'reponse' is not defined" error.


def factorielle(x):
    reponse = 1
    for i in range(1, x + 1):
        reponse *= i
    return reponse


#2

There is a bug in the submission correctness text (SCT) for this exercise. Add this to the end of your code as a workaround ...

# To pass, add this workaround
reponse = factorielle

#3

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