While learning Python at Codecademy, I just got stuck up at Functions. Though, I managed to clear most of the part but the review section caught me.
Here is the question which I am trying to solve:
- First, def a function, shut_down, that takes one argument s. Don’t forget the parentheses or the colon!
2)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”.
4)Finally, if shut_down gets anything other than those inputs, the function should return “Sorry”
I tried it in every possible manner, but I am frequently getting traceback, syntax error.