Draw a Box with Nested Loops

Screenshot of a program that shows an box with nested loops.
nested_loops_box.py
 1"""
 2Example "Arcade" library code.
 3
 4Showing how to do nested loops.
 5
 6If Python and Arcade are installed, this example can be run from the command line with:
 7python -m arcade.examples.nested_loops_box
 8"""
 9
10# Library imports
11import arcade
12
13COLUMN_SPACING = 20
14ROW_SPACING = 20
15LEFT_MARGIN = 110
16BOTTOM_MARGIN = 110
17
18# Open the window and set the background
19arcade.open_window(400, 400, "Complex Loops - Box")
20
21arcade.set_background_color(arcade.color.WHITE)
22
23# Start the render process. This must be done before any drawing commands.
24arcade.start_render()
25
26# Loop for each row
27for row in range(10):
28    # Loop for each column
29    for column in range(10):
30        # Calculate our location
31        x = column * COLUMN_SPACING + LEFT_MARGIN
32        y = row * ROW_SPACING + BOTTOM_MARGIN
33
34        # Draw the item
35        arcade.draw_circle_filled(x, y, 7, arcade.color.AO)
36
37# Finish the render.
38arcade.finish_render()
39
40# Keep the window up until someone closes it.
41arcade.run()