17 review functions codecademy


can someone help me here, i cant seem to find whats wrong

def shut_down(s):
if s == "yes":
    return " Shutting Down"
elif s == "no":
    return "Shutdown aborted"
    return "sorry"


your if, elif and else are not inside the function. Indent the code properly so that this is inside the function



thanks… after almost an hour


The if statement itself:

if s == "yes":
    return " Shutting Down"

is indented fine (indent refers to the empty space before return), but the if statement should also be indented since it is inside a function.

Read this help topic to make indent show on the forum as well:

This makes it easier for people to help you