''return' outside function


I need help. It says ''return' outside function (python, line 5)' and I can't seem to solve the problem

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

Please Help 17. Review: Functions

the code in the example is just a syntax reminder, your program should have a different design.

Start again, follow the instructions


2 posts were split to a new topic: Return outside function


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