Why my code return error



This is my code :

def factorielle(x):
    if x == 0 or x == 1:
        return 1
        return x*factorielle(x-1)

return error :
Your function failed on 1 as input to your function indicates "global name 'reponse' is not defined" error.

Why ?

Thank you for your help


Looks fine concerning just the coding, could you give a link to the exercise? Maybe the word response whose requested in the exercise?

PS: Sry, I edited your code so that the indents are visible or do you like the inline code version better?


Thank you for your reply.

Here is the link to my exercise



Ok I've not yet found an answer but could reproduce the error. After adding a print and removing it, it now complains that the case for 1 is not working, which it is... But as said the code seems to be fine and it does what it is supposed to do, so as far as I can see it is not your fault. I'll try a few more things.


Thank you for your help.


Seems like there is a problem with the test function, I flagged your post as a reminder and we'll have a closer look at it. For now just move on hopefully there are not many more bugs in this track :sweat_smile:


thank you, I will do so


Unfortunately there is currently no support for foreign language courses, so to get that point you might do this workaround:

Your code        
def reponse(x):
   again your code


Thank you very much, it allows me to continue