STEP 9: Time for our last dance move! Go to and drag out Define Function.

  • Drop the new function AFTER the sway function and BEFORE the lines that call the functions.
  • Name the function two_step.
  • Drop Loop with Range INSIDE the two_step function.
  • Drop Say INSIDE the loop. It should be indented 8 spaces because it is nested twice.

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)