Review: Functions


#1



https://www.codecademy.com/courses/python-beginner-c7VZg/4/1?curriculum_id=4f89dab3d788890003000096


Oops, try again. Your code looks a bit off. Feel free to peek back at earlier exercises if you need a refresher! Your code threw the following error: unindent does not match any outer indentation level (python, line 6)


I think my code should work.. and it doesn't and I don't know why.


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


#2

Never mind, I copied a code that looked exactly like mine.... and it worked..... So this exercise turned out to be just frustrating


#3

The indention of your code is a bit off. Indention is crucial in python.


#4

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