Fuctions Review Error


#1



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


For some reason Python thinks I'm not creating a shut_down function.
"Oops, try again. Did you create a function called shut_down?"


Looking at other topics, this is the same as many replies. I don't understand why it isn't working. I'm a little rusty, I haven't been doing a lot of this recently, but still, I expect this to work.

"First, def a function, shut_down, that takes one argument s. Don't forget the parentheses or the colon!"

I did this yet it thinks I have not. Thanks in advance, everyone.

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


#2

Here's a hint:

no & yes are strings, not booleans. Strings use quotes, like "car".

(BTW, I got my answer from my JS experience, not my Python (still learning the syntax of python :wink:, but your code worked for me when I fixed it.)


#3

why are yes and no variables? Because they are variables they are undefined

are you certain yes and no are the right data type?


#4

Ahh, thank you. I feel kinda dumb now, haha. Appreciate it!


#5

No problem, glad I could help!


#6