STEP 3: If we write a function, we can reuse it again and again!

  • From LOGIC, drag out Define Function to the TOP of your code and name it prowl().
  • From , drop Loop with Range indented inside the prowl() function.
  • In GRAPHICS, drop Flip Right Left inside the loop. It should be indented twice ········¬ !
  • Add Wait inside the loop and change the integer argument to 1. It should be indented twice as well.

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)