Is the teaching of coding an “add-on” or a discipline that can be integrated into other subject areas? While coding can be developed further into its own curriculum area, teachers are finding success teaching young students the basics of computer programming. The results are staggering! I have integrated coding in math initially to start a coding club. I soon realized that coding is best provided as an option in the classroom. In this article, I will outline how computer programming is an integration rather than an “add-on” to our approach in learning. I would like to highlight that coding is an excellent application of math skills. All math can be applied to daily life. As teachers, we have to apply learning so that our students see relevance. Coding applies so beautifully to math.

**Geometry and Spatial Sense**

Recently, I was teaching co-ordinate geometry to my grade sixes. In past years, it was difficult to explain how coordinates on a grid relate to the daily lives of students. Many students will go into careers that do not involve grids and coordinates. It was easy to explain and to demonstrate that the coding canvas is really a coordinate grid. Students understood that computer programmers rely on a coordinate grid to create movement in programs. What a great application of something that would merely seem like a puzzle without an application!

The above image shows how a character can be moved on a grid by changing x and changing y using Hopscotch. On the Hopscotch canvas, you can even move the character around and witness the x and y coordinates changing.

The above screenshot from Khan Academy integrates many aspects of geometry to design shapes on the plate. To program a shape, the user must input ellipse(x, y, width, height). In so doing, the shape is placed on a coordinate plane. Khan Academy moves away from “block coding” for an ideal experience for more experienced young programmers.

Finally, the use of robots emphasized the construction of shapes in such a motivational way. Even students with less coding success understood certain aspects and loved the resulting movement of Sphero. The code below programmed the robot to form a square.

This video shows the Sphero robot in action:

**Investigating Formulas**

I can recall being taught formulas as a student. The formula was written on the board and we had to memorize it for success. We knew better than to ask why a certain formula works or who came up with it. There was little emphasis on investigation. Today, we try to emphasize the discovery of the formula, but students do not understand it unless they investigate it themselves. Coding provides the opportunity for students to dig deeply into formulas and understand how they work.

Looking at the above code-in-process, Scratch allows students to construct the formula using operators. In this process, they understand the order of operations. If students construct the formula incorrectly, the code will not work creating the wrong answer. Without coding, you may think that the wrong answer is a bad thing. However, students are very committed to ensuring their code and formula work. They even became obsessive when trying to add lines of code so that their app incorporated units of measure. When students are persistent on including units of measure to their math, we know that coding serves a purpose in understanding math.

**Patterning and Algebra**

Patterning and Algebra has to be the most difficult math for students to understand. Some students love how abstract it is, while others can not understand what a variable is. Coding provides such a wonderful experience in the application of variables.

Students always have to create a variable to build any code for any strand. In a very natural way, they understand that variables represent a value that can change. The use of variables is needed to construct any code regardless of the strand you are teaching. Accidentally, they are learning about 2-step equations as well.

I can recall doing a problem solving question that involved birds flying in a v-pattern. While building codes, they created variables as changing values. We emphasized that the value of the variable depends on what the user enters into the program. Coding created a challenge for the class when one student incorporated a list (I admit to guiding them in this direction). Eventually, all the students wanted to incorporate lists into their code. When have students become so motivated to create a t-chart? And again, it was actually better when their codes were not working because students were fixated on making it work. Their mistakes led to better understanding.

LISA! This part is new:

**Creating Apps for Math**

Using Scratch, we were able to create apps to strengthen their understanding of math. Apps were made for two purposes:

- Students created apps for math ideas investigated in class. For example, apps were created for division with remainders, area and volume. The app below was created to determine the quotient and remainder for a division algorithm. We developed the code provided while reinforcing different functions. Concepts of computer science were introduced with the math ideas. The result was a keen interest in computer science and a deepening of math understanding!

2. Students created apps to assist with problem solving questions. Once students solved an assigned

problem, they would create an app that aligns with the facts to create a quicker answer. Once again, the students gained a precise understanding of the problem. Students even started to create visually pleasing apps. We started to evaluate the success of the app according to media principles such as ease of use the language. The app below was created to align with the following problem:

Katie buys 2 bags of apples for $5.95. In each bag, there are 12 apples.

To make money, Katie decides to sell the apples for $1.00 each.

Unfortunately, she does not sell 3 apples. Will she make a profit?

Could you suggest ideas so that Katie can sell all the apples and make a profit?

**Conclusion**

We definitely have to be judicious in choosing tools to introduce in class. There is a tendency for teachers to become too focused on the tool rather than the curriculum area. Coding, however, highlights and strengthens students understanding of math. In terms of learning skills, I have witnessed the persistence students have in developing the perfect code. When their code works, they exhibit such happiness. They want to share their code and end up explaining their mathematical processes. If we do not provide coding as an option, we are denying many learners the opportunity to express themselves using a differentiated method that suits them.

Thanks for sharing your coding experiences, Enzo! In the young primary grades, I’ve liked to use coding for directional language, one-to-one correspondence, understanding of numbers and how they compare to each other, and skip counting. I never really thought of coding as a real world application per se, as I’ll admit that I haven’t used it much in the real world and neither have my young students, but maybe in this case, the age of the student makes a difference. I do like how coding gets students to think and problem solve, and I so appreciate your posts & our discussions, to inspire me to think of more classroom coding options.

Aviva

I enjoyed reading how you have been using coding, my colleague and I have had similar success. As part of a University study we looked at how coding (we used Pynonkee) could effect knowledge and problem solving in measurement and geometry. The results were astounding – the growth the students made was huge and I think a major part of this is seeing a purpose to learning – they had to create a game for younger students. We will continue to include coding in our maths programmes – and look at how to use this in other curriculum areas as well!