17 Review : Functions



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


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. 


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