Please help!


what’s matter with this code?

def shut_down(s):

if shut_down(s) :
return ‘Shutting down’

elif shut_down(s):
return ‘Shutdown aborted’

return ‘Sorry’


In our if/elif/else statements (before the colon), that’s where we should check if s is equal to our string.


Thank you !! :smiley:


No way :confused:


Check out this example:

def myfunct(n) #we define our function
     if n == "" #our statement belongs to myfunct(), so we indent it.
        return "" #since this the result if true, we will indent it...
                      #... under our if statement.

So, anything indented under our function/statement, belongs to it. Check out the error Python is giving you, it tells you the issue, where it is, and how to fix it. :smiley:


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