So I've been having some trouble with functions lately . And now i'm stuck..... again. Here's my code:
def shut_down(s): if shut_down(s == "yes"): return "Shutting down" elif shut_down("no"): return "Shutdown aborted" else shut_down not ( "yes" or "no"): return "sorry" shut_down("yes")
When I save and submitt my code, the error message says:
Oops, try again. Your code looks a bit off. Feel free to peek back at earlier exercises if you need a refresher! Your code threw the following error: invalid syntax (python, line 7)
The console says:
File "python", line 7 else shut_down not ( "yes" or "no"): ^ SyntaxError: invalid syntax
I don't understand. I thought I did everything the way I was told how to. Where did I mess up?
Thank you to dayfiri and papusalaatti for answering my question. Sorry for taking so long to respond..... this was the only way I could.
Thank you again!