What am i doing wrong? 17.Review: Functions


#1


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

Oops, try again. Your shut_down function threw the following error: maximum recursion depth exceeded


i expect it to be riht


Replace this line with your code.


#2

my code:

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

#3

s will contain the string, so you should compare s with "yes" and "no"

this:

if shut_down(s)

is a function call, don't call the function inside the function, it will cause endless recursion (sort of like an infinity loop)


#4

Oh, Thanks! It's working for me now.


#5