'return' outside function


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

this is giving me
File "python", line 4
SyntaxError: 'return' outside function

Review: Functions

This code and the blatant error shows up far to often to be just a coincidence. Maybe start over from the beginning and follow the instructions closely.


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