Okay! Let’s review functions.
def speak(message): return message if happy(): speak("I'm happy!") elif sad(): speak("I'm sad.") else: speak("I don't know what I'm feeling.")
Again, the example code above is just there for your reference!
def a function,
shut_down, that takes one argument
s. Don’t forget the parentheses or the colon!
shut_down function receives an
s equal to
"yes", it should
return "Shutting down"
elif s is equal to
"no", then the function should
return "Shutdown aborted".
shut_down gets anything other than those inputs, the function should