Please look into this and let me know the mistake


#1

https://www.codecademy.com/en/courses/python-beginner-c7VZg/4/1?curriculum_id=4f89dab3d788890003000096#
Can you please look into this and let me know the mistake?


Review: Functions
#2

We cannot see your lesson submission at that link. It redirects to our own.

Please post the code you have so far. Thanks.


#3

def shut_down(s):
return s
if s == "yes":
return "Shutting down"
elif s == "no":
return "Shutdown abborted"
else:
return "Sorry"
Here is the code I have till now


#4

If this code came from some other source, that would be the first mistake. First rule of programming is to never use code one does not understand, especially if that lack of understanding prevents us from being able to spot the bugs, errors or omissions. In this case, the fix is simple and rather obvious. Take a closer look and see if you cannot resolve this without any further direction.


#5

Sorry for late reply, but this code was prepared according to the instructions and it is showing some kind of indentation error on line no. 4.


#6

Try taking out that line. Be sure all the indentation is consistent and correct.


#7

Thank you for your reply.
The code is working now


#9