Step 1: The code that creates this jungle scene is inefficient. Let's analyze the code!

  • Run the code and look at the stage. How many stars are drawn?
  • Think: What actions are the stage are repetitive?
  • Think: Which lines of code create the repetitive actions?
  • Use the code to answer the questions 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)