What should I do right?



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

It should work

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


So let's say that we call our function with parameter "yes":

print shut_down("yes")

In the first line of function:

return s

function will return passed parameter -> "yes" and execution of function will be terminated.

What is the purpose of this line:

return s



Ohhhhhh! I get it now !! :slight_smile: Thanks... I removed the return s line and it works now


You're very welcome :slight_smile:


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