17. Review: Functions Error - maximum recursion depth exceeded



Your shut_down function threw the following error: maximum recursion depth exceeded

I have no idea what is wrong with my code. I repeatedly get the error message above and I don't know what It means or what it wants me to do. Can anybody help me?

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


it means inside the function, the function is called. Sort of like an infinity loop, but then with functions

the function parameter s contains the string you supply as argument when calling the function, so you can compare s with yes/no


Thank You. That worked