Review: Functions not working


File "python", line 4
SyntaxError: 'return' outside function

I need it to return, which its not.

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


This is a review exercise, and the indications above are that the entire unit needs to be reviewed and practiced. Please review.


Could you please just explain what I did wrong?


Please explain what this is supposed to do.


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