Write a function, shut_down
, that takes one parameter (you can use anything you like; in this case, we\'d use s
for string).
The shut_down func
The code from the user 'grc' posted here, almost worked for me. I had to tweak the return message to get it right. If the message (meaning all returned strings) are not exactly the same as described on Codecademy, then the workspace will not validate your response.
def shut_down(s):
if s == "Yes" or s == "yes" or s == "YES":
return "Shutting down"
elif s == "No" or s == "no" or s == "NO":
return "Shutdown aborted"
else:
return "Sorry"