17. Review: Functions I NEED HELP!


#1



Oops, try again. Your code looks a bit off. Feel free to peek back at earlier exercises if you need a refresher! Your code threw the following error: 'return' outside function (python, line 5)


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


#2

and this time, start from scratch, not copied code. We've seen this snippet at least a hundred times, already. It's getting old.


#4

You might need to indent the lines starting with the "if" statement.


#5

That is one concern, but what about the elephant in the room?


#8

Wow thank you all!!!


#9

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