#17 Function: Review Pls HELP!


#1

I am stuck on function review for some reason it when I run the code it gives me syntax error. I tried indenting but it still gives me error . Below is the code . I'd really appreciate your feedback !

def shut_down(s):
if s =="yes"
return "Shutting down"
elif:
s == "no"
return "shut down aborted"
else():
return "sorry"

`


#2

Hi @sherkhan1,

This is invalid syntax ...

elif: 
s == "no"

The condition needs to be part of the elif header, placed prior to the colon.

Check the messages to be displayed. Spelling, spacing, and case need to be exactly as specified in the instructions.


#3

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.