K-5 Coding: 3 coding concepts, even a 4-year-old can understand

I know what you are thinking.. “a 4-year-old could never understand coding”. Well a 4-year-old can’t read code, but a 4-year-old can understand the foundations of coding. Whether it’s via a digital or a hands-on solution, kids can learn coding concepts long before they learn to read or write. With simple drag and drop platforms or with physical robots and block-based coding representations, kids can quickly grasp these 3 coding concepts used in any programming language – functions, loops and subroutines. 

Coding concepts for kids – Functions

What are functions in programming? Simply put, a function is a block of code that defines a sequence of steps or commands, such as movement. Functions are used to perform single or sequential tasks, they can be short and simple or long and complicated. Functions can be reused and adapted. Essentially, functions can do anything you tell them to. 

Explaining functions to kids is easy, just think of things they do every day, like brushing their teeth. You take your toothbrush, put on toothpaste, brush the lower teeth, brush the upper teeth, rinse out your mouth and rinse your toothbrush. When brushing teeth there is a certain order of actions we need to follow to do it correctly. Same applies to functions.  

Coding fundamentals for kids – Subroutines 

Subroutines are a way to run a function inside another function. It allows you to execute one or more functions inside the main function. 

It might sound a bit complex, but again it’s really easy to explain with things kids do everyday such as getting ready to go to the playground. You have to get dressed, you have to put on your shoes, your jacket and then you are ready to go. 

In this function “getting ready to go to the playground”, “getting dressed” is a subroutine, meaning that we need to execute a certain order of actions to get dressed – we need to put on a T-shirt, sweater, pants and socks. “Putting on your shoes” is also a subroutine – putting on the shoes and tying them. Tying the shoes is a subroutine in itself. 

Basically, when we get ready to go to the playground – a function, we need to complete specific tasks. Tasks that consist of other tasks – subroutines. 

Coding for kids – Loops 

Loops are a way to repeat an action a specific amount of times. A loop can be part of a function, a part of a subroutine or simply a subroutine. You specify the number of times a loop has to be executed. You can place any number of commands within the loop. You can even have a loop in a loop.

Loops are easily explained with the tooth brushing example. Tooth brushing an activity we repeat every day and we do it twice a day. So we tell the computer to repeat this function every morning and evening, every single day. We can even add a loop that tells the computer to brush the lower teeth side-to-side 100 times and brush the upper teeth side-to-side 100 times (or 99 or 98, we decide how many times a loop has to be repeated). 

Loops and subroutines are used to simplify code. They make code easier to read (for the developer) and to execute (for the computer). 

Coding in the classroom

There you have it, 3 coding concepts that a 4-year-old can understand!

You can bring these concepts to life in your classroom by using hands-on coding robots. At KUBO, we offer educational robots and the unique TagTile® coding system, that make coding a screen-free, tangible activity for kids as young as 4 years old. 

Looking for more STEM inspiration?

Sign up for our newsletter for early access to new STEM resources and activities for your
K-5 classroom.