Help with 17.Review: Functions


#1



https://www.codecademy.com/courses/python-beginner-c7VZg/4/1?curriculum_id=4f89dab3d788890003000096#


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"
    else:
        return "Sorry"


#2

in python elif not else if


#3

yeah just got it
thanks!


#4

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