Please Help!


#1

what is wrong the da code??? Help Please

def spam():

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

#2

please reply quickly


#3

I need help!! thx please help me


#4

try this

def shut_down(s):
    #this return statement will terminte the function
    #whenever you call this function whatever you pass as argument
    #will be returned and whatever follows is unreachable
    #get rid of it
    #return s 
    
    # here you have not declared any variable called shut_down
    # you will get an error should rather be 's'
    if s == 'yes': 
           return "Shutting down"
    elif s == "no":
           return "Shutdown aborted"
    else: 
        # you also have to return the sorry
           return  "Sorry"
           
print shut_down("yes")

You can also test it here
Click here to post