Return outside function


#1

i also have the same error

Oops, try again. Your code looks a bit off. Feel free to peek back at earlier exercises if you need a refresher! Your code threw the following error: 'return' outside function (python, line 4)

def shut_down(s):
    return s 
if s =="Yes":
    return "shutting down"
elif s =="No":
    return "shutdown aborted"
else:
    return "sorry"

''return' outside function
#2

Same advise:

Don't follow the design of the program in the example. Your program has a different design


#3

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