I have some problem with a task, and google have not helped me a lot.
I do not understand what is wrong.
Traceback (most recent call last):
File "python", line 10, in
File "", line 1, in
NameError: name 'Yes' is not defined
def shut_down(s): if s.lower() == "yes": return "shutting down" elif s.lower() == "no": return "Shutdown aborted" else: return "Sorry" s = input("Do you want to turn off? Write yes or no.").lower() shut_down() print (shut_down())