'return' outside function


#1

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

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


Review: Functions
#2

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.


#3

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