17. Review: Functions Error - maximum recursion depth exceeded


#1



https://www.codecademy.com/en/courses/python-beginner-c7VZg/4/1?curriculum_id=4f89dab3d788890003000096


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"
    else:
        return "Sorry"


#2

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


#3

Thank You. That worked


#4