17 Review : Functions


#1

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

What is the matter with the code?

def shut_down(s):

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



#2

Look at how we check if s is equal to the string in our elif statement. We should be doing the same with our if statement. And make sure your code is indented. :slight_smile: Example:

def my_func():
   #if statement:
       #if true, then whatever that's indented here will execute. 


#3

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