How to go about this?


#1




When I try to execute this code, the error message comes "Oops, try again. Your function failed on the message no. It returned 'Shutting down' when it should have returned 'Shutdown aborted' ".


I expect it to accept the code.


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


#2

this:

s == 'yes'

should be the condition of if:

if s =='yes':

then it should be good. Does this make sense?

look at this:

# function declaration
def shut_down(s):
    print s

# function call
shutdown("yes")

see how the function parameter (s) hold the string we pass as argument at the the function? that is why we compare s with "yes"


#3

@stetim94 Thanks for helping me.


#4