Review Functions


Review Functions

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

It should be returning 'Shutting Down' instead of 'Sorry'

def shut_down(s):
    if s == 'Yes':
        return 'Shutting down'

    elif s == 'No':
        return 'Shutdown aborted'
        return 'Sorry'



Also, I tried printing it with my code instead of returning it and the console printed "Shutting Down' (which is the correct phrase it should be returning.)


For this exercise, stick to lowercase inputs, yes and no, since that is what the lesson checker is using.


Thanks so much, I would have never gotten it otherwise!


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