STEP 2: Now, we will use nested for loops to create all of the bricks quickly and efficiently!

  • In drag out a Loop with Range. Change the range to 6! This is the amount of rows.
  • Add another Loop with Range INDENTED INSIDE the first loop! Change the range to 9.
  • In GRAPHICS from add a Rectangle inside the inner loop. It should be indented twice!
  • Change the .Rectangle() arguments to (x, y, 50, 25, "blue").

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)