What's wrong here guys? let me know


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


It's not indented, so it will not run at all.

If you mean that you have a different piece of code that behaves differently from what you want, then you'll have to show us that code and explain what it is doing differently from what you want!

I also think that if you simply read the code and execute it in your head, it will be quite evident what it's doing differently from what you want. If not, then you can add print statements in it to see what it does as it runs.


guys help i've tried everything and i cant see any problems

def shut_down(s):

if (s)==yes:
    return "shutting down"
elif (s)==no:
    return "shut down aborted"
    return "sorry"


thank you ... Now i need to focus more on it.


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

This worked for me , for some reason


Pretty sure you don't need those parenthesis. In addition make sure you type out what the instructions ask you to type out. If they ask you to type for a response "No Thank You" you type out No Thank you not "no thank you".


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