17. maximum recursion depth exceeded


hi all
I am stuck on the Review:functions lesson number 17

i keep on getting the error message
'Oops, try again.
Your shut_down function threw the following error: maximum recursion depth exceeded'
here is my code

def shut_down(s):
    if shut_down(s) =="yes":
        return "Shutting Down"
    elif shut_down(s) =="no":
        return "Shutdown aborted"
        return "Sorry"

could somebody please tell me what is wrong with it and what i need to do to fix it


Remove the shut_down in these two if and elif statements.


Shouldn't he remove the function from the if and keep the s? Checking to see if parameter is yes no or other?


Lol I meant to say it the other way around thanks for pointing out that. :slight_smile:


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