GRADE 3 — Enhancing EQAO mathematics + coding assessments

In my view, the Grades 1-9 Ontario mathematics curricula are the strongest I’ve seen anywhere. The most significant—most wonderful—innovation is the integration of coding (computer programming) and mathematics, across grades 1-9.

EQAO assessments serve as models for educators and education leaders of what should be taught in classrooms. How do Grade 3 EQAO assessments model the integration of mathematics and coding, and how may they be improved?


A Grade 3 EQAO question

Let’s take a close look at an EQAO question.

Shown below is a 2025 Grade 3 EQAO question (from https://www.eqao.com/math-resource-released-questions-g3-2025)

This question may address the following Grade 3 curriculum expectation:

C3.2 read and alter existing code, including code that involves sequential, concurrent, and repeating events, and describe how changes to the code affect the outcomes

Students are asked to read 4 different versions of code excerpts that use a repeating event (loop), and decide which one would create the outcome of “add 5 to number” 3 times.

The question may also address the expectation below, as “number” is a variable.

C2.1 describe how variables are used, and use them in various contexts as appropriate


The problem

There are a number of issues with this question.

  1. Although the question refers to lines of “code”, these are actually lines of “pseudocode” (pseudo means fake).
  2. The (pseudo)code in the question is a fragment. It lacks computational context. It also lacks mathematical context. This is a missed opportunity to model for students and educators how coding may be used to bring mathematics concepts and relationships to life .
  3. None of the 4 offered solution choices are correct. As written, none of the 4 solution choices would repeat the second line in the pseudocode. In real code, when a repeat code block is created, what is repeated is clearly identified as belonging to the repeat block. This is illustrated below in Scratch and Python, respectively.

DESIGNING Better questionS

Let’s connect variables and repeating events in a way that brings the meaning of variable to life dynamically.

Question context

The Scratch code below creates a spiral path.

(You can try it at: https://scratch.mit.edu/projects/1276834449/editor)

Question 1

Which one of the 4 edits to the code would create this spiral pattern?

Question 2

Which one of the 4 edits to the code would create this spiral pattern?


In the classroom

Repeating events

In grade 3, we begin by giving children existing Scratch code where a bug walks a square.
(You can try it at: https://scratch.mit.edu/projects/1276829944/editor)

Students run the code and observe what happens. Then we challenge them to modify it so that the bug walks:

  1. a bigger or smaller square, and
  2. a triangle or a hexagon.

After experimenting, they share their insights about how the code works.

Here, we start with live code and a puzzle. The code does something mathematical, and it represents ideas dynamically.

This is exactly what the curriculum envisions.

A variable in action

Next, we display this spiral pattern and ask students to pair, share, and discuss how they might modify the “walk a square” code to make the bug walk a spiral.

Students can describe the pattern verbally—walk, turn, walk a bit farther, turn, walk farther again—but they don’t yet know how to implement this in real code because they haven’t learned about variables.

So we say:

“I found some code that does this. Try it out. Explore how it works.”

We show them the working spiral code. They run the code to see what it does.
(You can try it at: https://scratch.mit.edu/projects/1276834449/editor)

Then we invite students, working in pairs, to modify this code to create the spiral patterns shown below.


Learning incidentally

Notice that we give students existing code that works, along with puzzles that require them to modify it. Code—like a bicycle, and unlike pseudocode—is alive. It is best learned through use, incidentally, through exploration, through meaningful mathematical activity.

This is coding as the curriculum intends it: dynamic, conceptual, mathematical.


Transforming mathematics education

Through the classroom activities shared above, what students experience, learn and understand about variables—and about algebra—is very different from what we learned in school.

When we ask adults what variables and algebra are about, the most common response is something like:

Algebra is when you solve an equation like x+5=12, and x is the variable whose value you have to find.

But in x + 5 = 12, x is not actually a variable at all.
It is a constant—specifically, x=7. Nothing in the situation varies.

And algebra is not fundamentally about finding the value of a constant.

Algebra is about relationships between quantities that change.
A genuine variable is something that varies—like in the spiral‑walking code, where both the repeat count and the step length change together in a coordinated way. Their values shift in relation to one another. That relationship is the algebra.

Real algebra is dynamic, not static.
It’s about expressing, exploring, and understanding how quantities co‑vary—not about uncovering a single hidden number.

This is the mathematics children need to learn.


Understanding mathematics and coding

Need more ideas on this theme? See https://imaginethis.ca/u

Need help implementing mathematics + coding? I am happy to offer online meetings/sessions with lead teachers and curriculum designers. See my contact info at https://imaginethis.ca/about


GRADE 9–Enhancing EQAO mathematics + coding assessments

In my view, the Grades 1-9 Ontario mathematics curricula are the strongest I’ve seen anywhere. The most significant—most wonderful—innovation is the integration of coding (computer programming) and mathematics, across grades 1-9.

EQAO assessments serve as models for educators and education leaders of what should be taught in classrooms. How do Grade 9 EQAO assessments model the integration of mathematics and coding, and how may they be improved?


The problem

This is the core mathematics + coding expectation for Grade 9 in the Ontario curriculum:

C2. Apply coding skills to represent mathematical concepts and relationships dynamically, and to solve problems, in algebra and across other strands.

Notice that the curriculum puts a focus on:

  • coding,
  • concepts and relationships, and
  • dynamic representation.

Let’s take a close look at an EQAO question.


Grade 9 EQAO question

Shown below is a 2025 Grade 9 EQAO question (from https://www.eqao.com/math-resource-released-questions-g9-25).

This question relies on pseudocode (pseudo means fake).

The pseudocode uses the formula for the perimeter of a rectangle,
P = 2 × width + 2 × length,
and determines the perimeter for length and width values entered by the user.

If we translated the pseudocode into actual, runnable code, executing it would simply produce a single numerical output. There would be no dynamic representation, no visualization of changing quantities, and no modelling of relationships—the very elements the curriculum emphasizes.

It is not clear why students in Grade 9 would need to write code to do a simple calculation related to the perimeter formula for a rectangle.

In Grade 5

The EQAO question posed to students along with this pseudocode is: determine the length when the width is 21 cm and the perimeter is 60 cm.

Using the perimeter formula for rectangles is a Grade 5 expectation. In fact, by Grade 5 students are already expected to go further conceptually—for example, understanding that shapes with the same area may have different perimeters, and solving related problems. This represents deeper mathematical thinking than simply substituting numbers into a perimeter formula.

In Grade 9

Below is the Grade 9 expectation related to area and perimeter, as well as surface area and volume.

E1.4 show how changing one or more dimensions of a two-dimensional shape and a three-dimensional object affects perimeter/circumference, area, surface area, and volume, using technology when appropriate 

The focus 0f this expectation is on changing dimensions and noticing effects. This can be modelled algebraically and graphically, as well as with code, to investigate patterns and solve optimization problems, such as finding the greatest area for a given perimeter or the shortest perimeter for a given area, as illustrated below.

For surface area and volume relationships, students may investigate how surface area and volume grow at different rates and real life implications. For example, surface area and volume relationships help explain how elephants’ big ears increase surface area (with minimal increase in volume) and help dissipate heat from their large bodies; and why our bones’ reliance on cross-sectional area for strength limits how much volume/mass they can support.

This type of modelling is an expectation in Grade 9.

D2. apply the process of mathematical modelling, using data and mathematical concepts from other strands, to represent, analyse, make predictions, and provide insight into real-life situations 

In short, the EQAO question shared above does not reflect the mathematical sophistication necessary in Grade 9, and it misses the curriculum’s focus on genuine coding and dynamic representation, and on modelling.

Let’s take a look at how we may design two better questions.


BETTER question #1

Context

Question 1 below focuses on linear equations like y = mx+ b, and the effect of slope (m) on their graphs.

  • This is grade 9 level content.
  • Additionally, the question uses Scratch, which:
    • provides dynamic output, and
    • models for educators how they may use real code in their classroom.
Question 1

Shown below is a Scratch program and its output.

Which of the 4 edits to the equation of the blue graph would make the two lines:

  1. parallel?
  2. perpendicular?
Question 1 in the classroom

This code is available at https://scratch.mit.edu/projects/1079745973/editor

Students are given the link to the code and work in pairs.

  • They alter the slopes and y-intercepts and observe how the graphs change.
  • They solve puzzles to alter the code so that the two graphs:
    • are parallel
    • are parallel and horizontal
    • are parallel and vertical
    • cross the y-axis at the same point
    • cross the x-axis at the same point
    • are perpendicular to one another
    • look different in some other interesting way
  • Students share and discuss as a whole class

Notice

We give students existing code that works, along with puzzles that require them to modify it.

Code—like a bicycle, and unlike pseudocode—is alive. It is best learned through use, incidentally, through exploration, through meaningful mathematical activity.

This is coding as intended by the curriculum: dynamic, conceptual, mathematical.


BETTER question #2

Context

Question 2 below focuses on the graphs of two linear equations, y1 = 0.5x + 10 and y2 = 0.25x – 10, and the effect of adding their y-values to get a new equation y3.

y3 = y1 + y2 = (0.5x + 10) + (0.25x -10) = 0.75x

The pink plot shown below represents y3.

Question 2

Shown below is a Scratch program which plots two linear relations, y1 and y2.

Imagine that a new conditional block is added (shown below) to also plot the graph of y1 + y2.

  1. What would be the slope of the new graph?
  2. What would be its y-intercept?
Question 2 in the classroom

This code is available at https://scratch.mit.edu/projects/1278149482/editor

The activity may be extended to subtraction as well as multiplication of y-values (which creates a quadratic function).

Addition / subtraction

y3 = y1 + y2 = (0.5x + 10) + (0.25x -10) = 0.75x

Students are given the link to this code and work in pairs.

  • They run the code and see what it does.
  • They predict the output when the conditional block for plotting y1 + y2 is added to the code.
  • They add the new conditional block (available at the above link) and run the code to text their prediction.
  • They solve puzzles in pairs …
    • Predict the equation and the graph for y3 = y1 – y2
    • [solution: y3 = y1 – y2 = (0.5x + 10) – (0.25x -10) = 0.25x + 20]
    • How is the slope of y3 related to the slopes of y1 and y2?
    • How is the y-intercept of y3 related to the y-intercepts of y1 and y2?

Pink plot shows y3.

Multiplication

  • Students work in pairs to predict the equation and the graph for y3 = y1 * y2
  • [solution: y3 = y1 * y2 = (0.5x + 10) (0.25x -10); y3 graph shown in pink below]
  • They alter and run the code to test their prediction.
  • They solve more puzzles:
    • Where does y3 cross the x-axis? Why?
    • How do the x-intercepts of y3 relate to the binomial factors (0.5x + 10) and (0.25x -10)? Why?
  • Students share and discuss as a whole class

Understanding mathematics and coding

Need more ideas on this theme? See https://imaginethis.ca/u

Need help implementing mathematics + coding? I am happy to offer online meetings/sessions with lead teachers and curriculum designers. See my contact info at https://imaginethis.ca/about