buongiorno,
mi sto cimentando nel Python e ho un problema con un pezzo di codice..
dovrei fare questo esercizio:
io ho scritto questo pezzo di codice ma mi da errore il compiler (compiler di CodeAcademy e mi da errore dicendo: ci sono diversi errori...)
- 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"
mi sapreste dire dove sbaglio?codice:def shut_down(s): if shut_down(s) == "yes": return "Shutting down" elif shut_down(s) == "no": return "Shutdown aborted" else: return "Sorry"