17/19: Help! I'm stuck!



When I hit the "Save and submit code" the following mesaage appears:

"Oops, try again. Your code looks a little bit off. Feel free to peek back at earlier excercises if you need a refresher! Your code threw the following error: expected an indented block (Python, line 2)".

What am I doing wrong? Here's my code:

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


Hi you should indent the if, elif and else statement
An example

def funName():
   if condition:
       #do something
   elif condition:
       #do something
       #do something


I finally figured out how the console points to your error.

In the console the little ^ points to exactly what is wrong. As to how to solve it , that is a different matter.
Though I I think I know how to sole your problem.

Your code is this:

if s=="yes":

Where it should look like this:

if s == "yes":

You are missing the spaces, at least my code ran fine when I entered it as so. As well as the post above, you need to indent your statements. Hope that helps.