7:17 I did create that function!


#1


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

It keeps saying 'Did you create a function called shut_down'


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


#2

That error isn't quite accurate, but if you test your code you'll find it doesn't act quite the way it should.


#3

I am not sure what is causing it to return an error


#4

Call your function and test its behavior. The instructions have described what it should do right? Test that.


#5

Well I have no idea what I did but now it works. Thanks anyway!


#6

That means there's something to learn, right! I'd definitely compare the code with what you posted here and test both versions and verify for myself and figure out why those changes should be made so that you can easily do it again later.


#7

you need to check if s is equal to yes/no by doing:

         if s == "yes"