Fuctions Review Error



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


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.)


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

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


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


No problem, glad I could help!