Review Function


#1

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

shut_down("no")

what is wrong with my code?


#2

File "python", line 4
SyntaxError: 'return' outside function

this is the error I receive


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