I am not sure what I'm doing wrong with this


#1



17. Review: Functions


expected an indented block (python, line 3)


def shut_down(s):

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


#2

the if/elif and else should have been nested inside the function:

def example():
    if True:
        return True

see how i indent if to place it inside the function?


#4

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