For this exercise, I wanted to recreate a pattern inspired by a textile-like image made of repeated colored squares and sticky note board.
The first step was to create the colored background. I used a nested for loop because I needed to repeat squares both horizontally and vertically.
To decide which color each square should have, I first calculated its row and column.

After finishing the background, I used another pair of nested for loops:

For the final layer, I added small yellow circles to the corner of each cream square. I used the same loop positions as the cream squares, so every pin automatically matches one square.

The most useful part of this exercise was realizing that a complicated-looking pattern can often be broken into a small number of repeated rules. Instead of thinking about the image as hundreds of individual squares, I started thinking about it as different layers.