Help!


#1



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"
    else: 
return "Sorry"


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


#2

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

Check the spelling.


#3

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


#4

def ___:
    if ___:
        return ___

There are two levels of indentation.


#5

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