Coding Step by Step

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:
- Follow a sequence of instructions one step at a time, such as "forward 2, turn right, forward 1."
- Write their own sequence of instructions, with arrows, words or pictures, to reach a goal.
- Predict where a set of instructions will end up before running it.
- Notice when instructions go wrong and fix them, which programmers call debugging.
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.
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.
| Goal | Buggy code | What goes wrong | Fix |
|---|---|---|---|
| 2 squares forward | forward, forward, forward | One step too many | Remove one forward |
| Up 1, then right 1 | forward, turn left, forward | Turns the wrong way | Change to turn right |
| Right 2 | forward, forward, turn right | Turn is in the wrong place | Move the turn to the start |
Common mistakes
- Mixing up left and right after turning. Once the robot faces the child, its left is their right. Let your child stand behind the toy or walk the path themselves to check.
- Forgetting that a turn doesn't move. Children expect "turn right" to also move one square. Practise turning on the spot with no step.
- Skipping steps. They write "forward" once for a three-square move. Insist that each card is exactly one step; counting the squares first helps.
- Giving up when it fails. A wrong result feels like failure. Celebrate finding the bug: "You spotted exactly where it went wrong!"
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.
Every worksheet is on the printable worksheets page.
Ontario curriculum: Grade 1, Algebra, expectation C3 · official document · U.S. Common Core crosswalk