Help with 17.Review: Functions


File "python", line 4
else if s == "no" :
SyntaxError: invalid syntax

no idea where go wrong
here's my code:

def shut_down(s):
    if s == "yes":
        return "Shutting down"
    else if s == "no":
        return "Shutdown aborted"
        return "Sorry"


in python elif not else if


yeah just got it


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