Math Bonk! Learning Centre Play the game

Coding Step by Step

Robot Toy

What your child is learning

Coding in Grade 1 rarely involves a computer. It's about giving clear, step-by-step instructions in the right order, so that someone (or something) can follow them exactly. A "program" might be a row of arrow cards that moves a toy bear across a grid to reach a picnic basket.

Children learn to:

Ontario added coding to the Algebra strand in 2020. In Grade 1 the focus is on sequential instructions: steps that happen in order, one after another. Loops and choices come in later grades.

A program is a list of steps done in order, from top to bottom.A program is a list of steps done in order, from top to bottom.StartMove forward 2 squaresTurn rightMove forward 1 squareStop
A program is a list of steps done in order, from top to bottom.

Why it matters

Computers follow instructions exactly and without guessing what we meant. Learning to think that way, precisely and in order, is useful well beyond computers: in following a recipe, giving directions, or explaining how you solved a math problem.

Coding also gives children a safe, low-stakes way to be wrong. When the toy bear walks into the wall, the fix is obvious and fun to find. Debugging teaches that mistakes are information, not failure, an attitude that helps across all of math.

And it links directly to spatial sense. Moving on a grid uses left, right, forward and backward, the same position words children learn when describing location and movement.

How to teach it

1. Be the robot

Tell your child you are a robot and can only do exactly what you are told. They have to get you from the couch to the kitchen door. If they say "go to the door," you stand still: robots don't know what that means. They need "walk forward 4 steps, turn left, walk forward 2 steps." Follow their steps literally, even if it means walking into a chair. Children find this hilarious, and the lesson sticks.

2. Use a grid on the floor

Use painter's tape to make a grid of squares on the floor, or use large floor tiles. Place a toy as the "robot" and a goal object a few squares away. Your child gives one instruction at a time, and you move the toy one square per step.

3. Write the code with arrow cards

Cut small paper cards and draw arrows: forward (↑), turn right (↻), turn left (↺). Your child lays out the whole sequence before moving the toy, then you "run" the program together card by card.

Worked example: The bear starts in the bottom left corner of a grid, facing up. The honey is 3 squares up and 2 squares to the right.
Code: forward, forward, forward, turn right, forward, forward.
Run it: the bear moves up 3 squares, turns to face right, then moves 2 squares right. It lands on the honey.

4. Predict, then run

Before moving the toy, ask: "Where do you think it will end up?" Have your child point to the square. Then run the program and see if they were right. Predicting builds the mental tracking that real programming needs.

5. Debug

Give your child a program with a mistake in it and ask them to find and fix the problem. In every row of this table the robot starts facing up the grid.

GoalBuggy codeWhat goes wrongFix
2 squares forwardforward, forward, forwardOne step too manyRemove one forward
Up 1, then right 1forward, turn left, forwardTurns the wrong wayChange to turn right
Right 2forward, forward, turn rightTurn is in the wrong placeMove the turn to the start

Common mistakes

Do this together

Dance code. Make a small set of move cards with a simple drawing on each: clap, jump, spin, touch toes, wave. Your child lays out a row of five or six cards as the "program," and the whole family performs it in order, exactly as written. Then your child changes one card, or swaps two, and everyone predicts how the dance will be different before running the new version.

Swap roles: you write the dance and slip in a card that doesn't belong, like a sixth "jump" when you said the dance ends with a wave. Your child reads the code, spots the bug and fixes it before anyone moves.

Printable worksheet

17 questions, a picture warm-up and drawing tasks, with an answer key on its own page. Print it or save it as a PDF.

Open the worksheet

Every worksheet is on the printable worksheets page.

Ontario curriculum: Grade 1, Algebra, expectation C3 · official document · U.S. Common Core crosswalk