Help with Step 17, Function Review


#1


def shut_down(s):
I am working on #17 Review: Functions. I have reviewed the Discussion but I still need help. Below is my code

def shut_down(s);
if s=="Yes":
return "Shutting Down"
elif shut_down(s):
s=="No"
return "Shutdown aborted"
else:
return "Sorry"

shut_down("Yes")

This is the error that I am getting:

"pythonOops, try again. Your shut_down function threw the following error: maximum recursion depth exceeded in cmp"

`


#2

Here is where the recursion is happening.

Write the condition like you did for "yes". Note that the lesson asks for lowercase "yes" and "no".


#3

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