Session Ready
Exercise

Functions with multiple default arguments

You've now defined a function that uses a default argument - don't stop there just yet! You will now try your hand at defining a function with more than one default argument and then calling this function in various ways.

After defining the function, you will call it by supplying values to all the default arguments of the function. Additionally, you will call the function by not passing a value to one of the default arguments - see how that changes the output of your function!

Instructions
100 XP
  • Complete the function header with the function name shout_echo. It accepts an argument word1, a default argument echo with default value 1 and a default argument intense with default value False, in that order.
  • In the body of the if statement, make the string object echo_word upper case by applying the method .upper() on it.
  • Call shout_echo() with the string, "Hey", the value 5 for echo and the value True for intense. Assign the result to with_big_echo.
  • Call shout_echo() with the string "Hey" and the value True for intense. Assign the result to big_no_echo.