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


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"
    return "Sorry"


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?


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