Error: "Your function failed on the message yes"


Stuck at: 17. Review Functions

def shut_down(s):
return s

if s=="yes":
    return "Shutting down"
elif shut=="no":
    return "Shutdown aborted"
    return "Sorry"

"Oops, try again. Your function failed on the message yes. It returned 'yes' when it should have returned 'Shutting down"

What's wrong here?


That line can be removed. It returning the parameter value, not a message.


If I remove "return s", I get this error:

Oops, try again. Did you create a function called shut_down?


I don't see any other issues. Please repost your code along with a link to the lesson so we can test it. Thanks.


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