I don’t really understand why this was given wrong during a lesson in python on codecademy. Codecademy said that my code returned Shutting Down when “no” was selected, which was wrong.
Here are the instructions:
First, def a function, shut_down, that takes one argument s. Don’t forget the parentheses or the colon!
Then, if the shut_down function receives an s equal to “yes”, it should return “Shutting down”
Alternatively, elif s is equal to “no”, then the function should return “Shutdown aborted”.
Finally, if shut_down gets anything other than those inputs, the function should return “Sorry”
This was my response:
return "Shutting down"
return "Shutdown aborted"
If you know the answer, please reply as I am very confused about this problem.