17, Review Functions help plz



Whenever I enter the code it just says,"Oops, try again. Did you create a function called shut_down?" I don't get it because I obviously did create the shut_down function.

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


Be sure your comparison values are strings. 'yes', 'no'.


Thanks a lot, but can you explain why though?


yes and no look like variables to the interpreter. They are not defined so will raise a reference error.

if s = 'yes':


Ohhh, thanks for the help


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