Review: Function Help, Its going crazy


It says that i should try again and "Your function failed on the message yes. It returned 'yes' when it should have returned 'Shutting down'"

It printed Shutting Down but then i gave me the error

def shut_down(s):
    return s
if shut_down("Yes"):
    print "Shutting down"
elif shut_down("No"):
    print "Shutdown aborted"
    print "Sorry"


In order to activate your if elif statement, it should be in the function shut_down, not outside of it.


Remember that print is not return.


The if and elif statements are part of the function.


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