Step 2: Time to finish and call your new function!

  • Copy the three action commands from any of the original functions into fly().
  • Replace the integers parameters in .move_up() and .move_down() with fly_height.
  • Delete every function and function call except fly().
  • Call fly() five times! Pass in the correct values as arguments so the toucan flies high, high, low, medium, low.

To navigate the page using the TAB key, first press ESC to exit the code editor.

# THIS ACTIVITY IS IN PREVIEW ONLY MODE
  • Run Code
  • Submit Work
  • Next Activity
  • Show Console
  • Reset Code Editor
  • Codesters How To (opens in a new tab)