Errors in 17.Review:Function


File "python", line 3
if s == "yes":
IndentationError: expected an indented block

def shut_down(s):

if s == "yes":
 return "Shutting down"
elif s == "no":
 return "Shutdown aborted"
 return "Sorry"


The error says that your if statement needs to be indented.
Indentation is important in Python. Anything nested inside something should be indented.
A general format is

def random_function(x):
    if x == "foo":
        return "foo"
    elif x == "foo foo":
        return "foo foo"
        return "foo foo foo"


I have solved it


A post was split to a new topic: 17. function review