STEP 4: We are ready to create the next row. We need to reset the x-coordinate, and decrease the y-coordinate!

  • From drag out an Integer Variable into the OUTER loop (indented once total!).
  • Change my_var to x and 1 to -220. This resets the value of x before we begin creating the next row!
  • Add Subtract Value into the outer loop (indented once!)
  • Change my_var to y and 1 to 30. This spaces our rows 5 pixels apart (each brick is 25 pixels tall).

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)