Skip to content
A 10 by 10 coding grid with cells A1, B1, C1, B2 and B3 filled to form a capital T, next to the program F R F R F L D F D F

Pixel Art Coding: A Partner Challenge for Elementary Students

Pixel art is a natural next step after a first graph paper programming lesson. Students see how a short list of precise instructions becomes a picture, and they find out fast what happens when an instruction is vague.

This is the second post in our unplugged coding series. If you're new to it, start with Teach Coding Without Computers.

Setup

DryErase.com 100 Count Graphboard with a 10 by 10 grid of one-inch squares

Each pair needs a 100 Count Graphboard, two markers and an eraser. Label the columns A–J across the top and the rows 1–10 down the side. Programs always start at A1.

The commands are the same as before: U, D, L and R move one cell, and F fills the current cell without moving.

Warm-up: predict the picture

Write this program on the board: F R F R F L D F D F

Before anyone draws, ask students to predict the picture. Then run it together. It fills A1, B1 and C1, steps back left to B1, then moves down to fill B2 and B3. The result is a capital T.

The step back with L is the interesting part. Ask students why it's there and what would happen without it.

Mystery picture challenge

  1. Student A secretly draws a picture using five to eight cells, then writes the program for it on the back of the board.
  2. Student A clears the grid and hands over the program only, not the picture.
  3. Student B runs the program exactly as written, starting at A1.
  4. The pair compares the result with the original. If they don't match, they find the first command where things went wrong, fix it and run it again.
  5. Switch roles.

Ways to extend it

  • Use the whole board: the picture must reach at least one cell in columns F–J or rows 6–10.
  • Add a second color: introduce a second fill command for a different marker color.
  • Shortest program wins: challenge students to find more than one program that draws the same picture, then compare which uses the fewest commands.
  • Corner to corner: draw a picture that reaches J10 without ever leaving the grid.

The big idea: data vs. steps

A filled-in grid describes a picture as data: which cells are on and which are off. The program describes the steps to draw it. Ask students to explain the difference in their own words. It's the same idea behind how computers store and display images.

What to assess

  • Can students explain exactly what F does, and why moving right doesn't color a cell?
  • When a picture comes out wrong, can they point to the first incorrect command?
  • Do their programs work for a partner without any extra hints?

Next in the series: debugging, where students find and fix a deliberately broken program.

Sources and further reading

Next article Teach Coding Without Computers: Graph Paper Programming on a 100 Count Board