Please Help!


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"


please reply quickly


I need help!! thx please help me


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"
        # you also have to return the sorry
           return  "Sorry"
print shut_down("yes")

You can also test it here
Click here to post