Review Functions.. Help me out


#1

Here is the error the translator is putting out ---

File "python", line 1
def Shut_down("yes")
^
SyntaxError: invalid syntax

Here is my code ---

def Shut_down("yes")
return S

if s == "yes":
return "shutting down"

elif s == "no":
return "shutdown aborted"

else:
return "sorry"


#2

Be case-sensitive with writing your code. The instruction says "shut_down" as name of function and not "Shut_down". Please check all through.

Don't forget your colon ( : ) after the function.

Also, the argument for the function is s and not "yes".

No need for this, below.

Be case-sensitive with your return statements. It's

return "Shutting down"

return "Shutdown aborted"

return "Sorry"

Finally, ensure your indentation is right by hitting the enter key on your keyboard after a colon ( : ) where necessary. :slight_smile:


#3

Also, the parameter should be a variable, not a string literal.


#4

A post was split to a new topic: What does this mean what's wrong?


#5