17/19 To me this looks totally right not sure what I messed up on


#1

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

#2

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


#3

So is this the only way to get a right answer? I typed in the following:

def shut_down(s):
return s

if yes():
    return "Shutting down"
elif no():
    return "Shutdown aborted"
else:
    return "Sorry"

The format is based on the example of happy(), sad(), etc. given in the text above the instructions...


#4

adding the quotations around if seemed to do the trick, thanks for the help guys and gals.


#5

if s=="yes"
if s=="no"


#6

I keep getting line 5 'return' is outside function. It happens on the first if line but I had what was typed here when I started out. What does that syntax error mean?