CHECK FOR UNDERSTANDING: Take a look at the editor below. At the top of the program is the refactored code you created. At the bottom, commented out, is the original code. Our code now uses a function and a loop so it's less repetitive.

  • Click Run and notice that the panther does the same thing he did in the last activity.
  • Use the code in the editor below to answer the questions that appear on the stage.

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)