Hello I am stuck at functions this is the code I have

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

can you please help I cant find any way to fix it.


The return statements should be indented inside their respective conditional block.

Check the spelling.


I checked the spelling and fixed it but I did not understand what you said first can you explain more.


def ___:
    if ___:
        return ___

There are two levels of indentation.


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