17, Review Functions help plz


#1



https://www.codecademy.com/en/courses/python-beginner-c7VZg/4/1?curriculum_id=4f89dab3d788890003000096


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"
    else:
        return "Sorry"


#2

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


#3

Thanks a lot, but can you explain why though?


#4

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

if s = 'yes':

#5

Ohhh, thanks for the help


#6

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