Error: "Your function failed on the message yes"


#1

Stuck at: 17. Review Functions

def shut_down(s):
return s

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

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

What's wrong here?


#2

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


#3

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

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


#4

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


#5

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