IndentationError: expected an indented block"


#1

I'm not sure what I'm missing. Here's my code:

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

Here's my error message:

Oops, try again. Your function failed on the message no. It returned 'Shutting down' when it should have returned 'Shutdown aborted'

What can I do?


17. Review: Functions
17. Review: Functions
#2

Thanks! Here's my final code and it worked!
Uploading...


#3

Hi @tizguppies,

Look at all these portions:

what do you mean by these? Hint: think about if ____ == "yes":

:slight_smile:


#4

Hi, I'm a begginer coder but you have to indent lines 3, 5 and 7. Good job. I like your code.


#5

Sorry, single indent all the lines except 3,5, and 7 and for those you double indent.