Why and How to Teach Computer Coding to Primary Students

Why Teach Computer Coding?

There is no way of denying it, we live in a digital world. Computers, smartphones, and tablets are everywhere and practically everything we do requires some sort of programming. Since it is our job as educators to prepare students for the future, it is important to introduce and teach computer programming to help prepare students for the jobs of tomorrow.

The earlier we introduce students to computer coding and programming the more comfortable and successful they will become when faced with more challenging learning opportunities. Plus, young students are often eager to use and learn about computers and programming because they love using technology. In addition, research shows that young students’ brains are more receptive to computer languages at a young age, just like foreign languages.

Teaching coding also improves:

sequencing skills

problem-solving

logical thinking

cause and effect skills

computational thinking

counting

How to Introduce Computer Coding

When introducing coding to young students, I like to first explain that computers can not function on their own. They can not do anything without a person telling them what to do.

The person who tells a computer what to do is a programmer. A programmer uses code to tell the computer what to do.

The code tells the computer exactly what to do and has to be written in the correct order or it will not work properly. A computer always follows a code exactly in the order it is written. The order that a computer follows the code is called a sequence. If the sequence is not correct, the program will not function properly.

For example, when putting on your shoes and socks you would not put your shoes on and then put on your socks. It is important to do it in the correct sequence in order to get the desired outcome, put on your socks first and then your shoes.

Hands-On Activity

After students understand that code is what computer programmers use to tell computers exactly what to do and the sequence of code is important, we do a fun hands-on activity.

Since Computer Science Week falls in December, I use a Christmas or winter themed activity. You can use any theme you wish.

In this activity, students first design a map or grid and then act as programmers to design basic code in the correct sequence that will command a character to follow the path and move to a select location (end point).

In these examples, the map is the North Pole (Christmas theme) or a ski slope (winter theme) and students are directing Christmas characters or skiers and snowboarders using code. We start off with simple code: right, left, up, down.

First, students pick and choose design pieces to place in any of the squares on the grid. Since there are a number of different design pieces from which to choose, play is different each time.

Then, students choose an end point for their program. It can be any square on the grid. They can choose to end at an object or any blank square except the starting point which is the square with the gold star.

Next, students use the directional arrows to create the code in the correct sequence that will move the Christmas character or skier or snowboarder from the square with the gold star to the chosen end point.

You can easily create movable characters by either folding a paper clip upright and taping the character to it so it stands upright or placing the character in a small binder clip so it stands upright.

This hands-on activity helps students visualize coding and helps them understand the importance of using the correct sequence when coding in order to get the desired result.

Non-Computer Printable Practice

Before students move on to digital coding practice, I like to have them practice on paper and also assess their understanding. I use simple grid pictures, again these are Christmas and winter themed for Computer Science week in December but you can use any theme.

First, students practice following code by drawing the path according to the code starting in the box with the star.

We complete these several ways: using pencils, crayons, dry erase markers, or Dot Painters.

Next, students practice creating code by programming the code for the highlighted path through the North Pole or down the ski slope by drawing directional arrows in each coding box across the top.

Digital Practice

Once students feel more comfortable with coding, we move on to digital practice, first with Boom Cards and then with apps.

I like using the Boom Cards first because they are self-checking and have audio directions so young students can complete them independently. Also, I receive data on each student so I can assess their understanding.

We use Boom Cards that match the Christmas and winter themes with which the students are familiar. In the first set of decks, students move a Christmas character or a skier or snowboarder to the correct place at the either the North Pole or the ski slope by following the code. Then they click the Submit button to see if they are correct.

This helps students learn the importance of following each step of code in the correct sequence in order to get the the desired response and why sequence matters in a computer program.

In the second set of decks, students create the code for the highlighted blue path through the North Pole or down the ski slope by dragging and dropping the arrows to the boxes. They then move the Christmas character or skier or snowboarder from the box with the gold star along the path according to the code they created.

This helps students learn the importance of creating each step of code in the correct sequence in order to get the the desired response, why sequence matters in a computer program, and the importance of checking / testing your code.

This short video shows us using the coding Boom Cards:

Coding with Loops

Once students understand basic coding, I introduce loops. I explain that there is a more efficient way that programmers code instructions that repeat over and over again – they use loops. Loops help a computer save processing power because it doesn’t have to read as many instructions. A loop is a set of instructions that is repeated over and over again.

For example, if you were giving instructions to someone on how to get to our classroom you might say: turn right – walk forward – walk forward – walk forward – walk forward – turn left. You could use a loop instead of writing walk forward 4 times: turn right – loop: (forward 4) – turn left. They would understand to go forward 4 times.

We then practice loops that instruct students to repeat a movement or direction (up, down, right, left) a certain number of times. For example, the following code instructs students to move right 3 times – Loop: ( → 3). Loop instructions are shown inside parentheses following the word “Loop”.

Hands-On Loop Activity

Similar to learning basic code, we start out with the hands-on mapping activity shown above. However, this time when we create the code we use loops for any commands that repeat.

Printable Practice with Loops

Before students move on to digital coding practice with loops, they practice on paper using simple grid maps (pictures).

First, students practice following code that contains loops by drawing the path according to the commands starting in the bottom left box with the star.

We complete these similar ways as the basic coding sheets: using pencils, crayons, dry erase markers, or Dot Painters.

Next, students practice creating code by programming the code for the highlighted path by drawing directional arrows in each coding box and writing numbers on the lines to create loops and single instructions.

Digital Practice with Looping

Once I feel students comprehend coding with loops, we move on to digital practice with Boom Cards.

As I stated above, I like using Boom Cards because they are self-checking and have audio directions so young students can complete them independently. Also, I receive data on each student so I can assess their individual understanding.

We use Boom Cards similar to the basic coding decks with which students are familiar. In the first deck, students move a Christmas character (either a reindeer, Santa, Mrs. Clause, or an elf) to the correct place at the North Pole by following the code with loops then click the Submit button to see if they are correct.

This helps students learn the importance of following each step of code in the correct sequence, why sequence matters in a computer program, and how to code more efficiently using loops.

Once students can follow code that has loops, they create the code for the highlighted blue path using loops. They drag and drop the arrows to the large blue boxes and insert numbers in the smaller boxes. They then move the Christmas character from the box with the gold star along the path according to the code they created to test it.

Coding Apps

Once students are comfortable with following and creating code, we begin to use coding apps.

A Little Note

Some of the Amazon links on Lessons for Little Ones are affiliate links. If you purchase a product after clicking an affiliate link, I receive a small percentage of the sale for referring you, at no extra cost to you. Purchasing through affiliate links is an easy, painless way to help out your favorite bloggers. Thank you so much for your continued support!