Early coding

What Is Coding?

Coding means writing a program — a set of commands for an executor, the one who carries out the actions. Each command tells the executor what to do. For example, “forward 3” means “take three steps forward.” The number of commands is usually limited, and the executor understands only specific ones. It can follow “forward 3,” but not “go forward.”

In coding for kids, these commands are often shown as pictures or icons, such as an arrow for “forward 1.” The executor might move across a screen or even crawl across the floor like a little robot.

Why Does It Matter for Kids?

Seymour Papert was the first to talk about a new role for computers in learning. He believed that computers shouldn’t teach kids — kids should teach computers. After all, the language of computers is the language of math. When kids “speak” this language, they learn mathematical ideas as naturally as they learn their native tongue.

In 1967, Papert created the Logo programming environment, where kids could control a turtle on the screen. The same language could also guide a real turtle robot on the floor, which moved, lifted and lowered a pen, and drew pictures.

Modern research supports Papert’s vision. Learning to program helps kids develop spatial and geometric understanding, strengthen reasoning, and improve overall cognitive skills.

For example, when kids program small robots like Cubetto or Bee-Bot to draw shapes, their geometry skills grow significantly — and those gains last. In another program called I Love Math with Robots, an eight-month course led to strong improvement in early math test scores compared with a control group. Even shorter courses, just a few weeks long, help kids reason more clearly and express their thinking more logically.

Why does it work? Programming invites kids to use what they already know about numbers, measurement, and geometry for a real purpose — teaching a robot. The robot’s immediate response shows whether a command makes sense, so kids see their logic in action.

Just as important are the conversations that follow. Talking about what happened, comparing strategies, and explaining choices helps kids put their mathematical thinking into words. In one study, researchers recorded kids as they created and fixed programs, then analyzed their speech using fine-grained coding to identify types of mathematical knowledge. The results were clear: kids counted, measured, worked with directions and grid coordinates, and reasoned logically. In other words, they verbalized and applied a broad range of mathematical ideas.

How Do We Teach?

Kids begin with simple commands for characters that move across a surface — up, down, left, and right. It might be a ninja climbing walls or a robot gliding over tiles. Others travel along paths, like squirrels who can turn left, right, or run straight ahead.

Soon these single commands link into longer chains that become short programs. Each step makes thinking visible: a wrong command shows its effect immediately, and a “branch” becomes a real fork in the road. Abstract ideas take on shape and movement, making them much easier to grasp.

As kids get comfortable, programs grow longer and more complex. Small subroutines appear — little sequences that can be reused as a whole without breaking them back into single steps.

In one game, kids help a scarab sort marbles into baskets marked with colors. To do this, they use conditional “if… then…” rules and block diagrams. A recoloring command changes every marble that passes through it to the same color. This is where kids first meet the idea of recursion — repeating an action again, but under new conditions.

First Steps

Simple Commands

At first, kids learn to give basic commands to different executors — characters who follow their instructions. In one game, a ninja moves using arrow commands: up, down, left, and right. On the first level, the task is simple — choose the right arrow, and the ninja reaches the kitten. If the hero takes a wrong turn or falls, nothing terrible happens. The ninja magically reappears in the same spot, ready to try again.

Later on, a new command appears: “take the fish.” The round is considered successful even if the kitten doesn’t get the fish, but many kids enjoy making a detour to collect it for their furry friend.

Simple programming

Visual 1-step programs

Another executor is a robot that crawls across the screen and follows four commands: forward, backward, left, and right. In the first levels of the space race, kids choose the command that brings the robot to the flag placed on a pink field. If they make a mistake, the robot still moves in the direction they selected, so it’s easy to see how far off the path it goes.

These two executors work in absolute coordinates — the result of a command doesn’t depend on which way the character is facing or on previous moves.

Then come the squirrels. They run along paths and can turn right, left, or go straight ahead. Here, relative coordinates are at work: the outcome of each command depends on the squirrel’s position and direction — where it is and which way it’s facing.

Simple programs: choose a command to lead the robot to the mushroom
Simple programs: choose a command to lead the robot to the mushroom
Simple programs

Guide the robot

Simple programs: choose a command to take the robot to the flag
Simple programs: choose a command to take the robot to the flag
Interpret programs

Interpret 1-step programs

Simple programs

Left and right turns

Simple programs

Left and right turns

Deep Understanding

Reach the Goal!

The first programs kids write may have only two commands. Step by step, the robot learns new moves — now it can travel diagonally as well.

Interpret programs

Interpret 3-step programs including diagonal steps

Tasks soon get more challenging. The robot might need to collect all the coins on the field or clean up every piece of trash.

Programs for the squirrels also grow longer. For example, kids might need to figure out what happens if the squirrel turns right at the first fork and left at the second. These puzzles are trickier because the commands are written from top to bottom, while the squirrel actually moves from the bottom of the path upward.

In the advanced ninja levels, kids receive more complex diagonal commands — up-right, up-left, and down. Even without a direct “up” command, it’s still possible to reach the kitten; the route just becomes a little longer. As the ninja follows each command, the path on the tall building lights up, showing every step. In the corner, a little buddy is always ready to give a hint if the task feels too hard.

Simple programs

Guide the robot

Simple programs: follow the route and find what the squirrel will reach
Simple programs: follow the route and find what the squirrel will reach
Simple programs

Simple route programs

Simple programs: use arrows to model the path of the ninja to the cat
Simple programs: use arrows to model the path of the ninja to the cat
Simple programs

Build 3-5 step programs

Simple programming

Create 4–8 step programs with 3 blocks of commands, obstacles & stop

Confident Mastery

IF–ELSE Operator and Block Diagrams

The conditional operator appears in tasks built around the question “What happens if…?” For example, a problem about addition might ask: What happens if three elephants get two more guests? A child imagines the new elephants arriving and counts everyone together — that’s their first encounter with conditional reasoning.

If-else statement: check if the claim is true after adding 2 elephants
If-else statement: check if the claim is true after adding 2 elephants
Tricky counting

Introduction to IF-ELSE statement

In a game where kids help a scarab sort marbles by color, they work directly with conditional rules and flowcharts. At the simpler levels, they use a condition block to send marbles of one color in one direction and all others in another. Later, the challenge grows: kids use several blocks to sort marbles of three colors into their matching baskets.

Finally, a recoloring command appears. Every marble that passes through it changes to the same color, then rolls back toward the starting funnel. With certain combinations of blocks and conditions, kids can observe a fascinating phenomenon — looping. The marbles keep cycling through the system endlessly, giving kids their first glimpse of what programmers call an infinite loop.

Sorting algorithms: help the scarab sort the colored balls into baskets
Sorting algorithms: help the scarab sort the colored balls into baskets
IF-ELSE statement

IF-ELSE schemes: sorting objects (2 colors, 1 operator)

Sorting algorithms: help the scarab distribute the colored balls into baskets
Sorting algorithms: help the scarab distribute the colored balls into baskets
IF-ELSE statement

IF-ELSE schemes: condition applies to another color (1-3 colors, 1-3 operators)

IF–ELSE statement

Schemes with recoloring blocks and IF–ELSE operators (2 colors, 1 recoloring operator, and 1 conditional operator)

IF–ELSE statement

Schemes with recoloring blocks and IF–ELSE operators (3-4 colors, 1 recoloring operator, and 2 conditional operators)

Big ideas​​

The idea of an algorithm — a clear sequence of steps for an executor — is one of the great inventions of modern thought. The mathematician Alan Turing introduced the concept of a theoretical computing machine and later helped design real computing systems that laid the foundation for modern computers.

Today, the same idea shapes the world around us. Every production line, from cars to cookies, runs on programs that tell machines exactly what to do. Understanding how those programs work is becoming a kind of second literacy.

When kids build a system of pipes and condition blocks for the scarab, they’re really creating a block diagram of an algorithm — one that includes logical branching. The recoloring command introduces them to recursion: repeating the same action again, but in new conditions.

And the looping they observe isn’t just a game quirk. It’s their first glimpse into one of the deepest questions in computer science — the halting problem. For simple programs, we can easily tell whether the process will end. But for more complex ones, even the most advanced computers can’t always predict whether they’ll ever stop or keep running forever.

Discover our award-winning app

‘Biggest math fans
we know’

‘One of the best multilingual math education apps’

Apple logo
Forbes logo
  • The Webby Award

    Best Visual Design

    Kidscreen Award

    Best Educational App

    Mom’s Choice Award

    Gold winner

    EdTech Breakthrough

    Best Math Learning Solution

    Horizon Interactive Awards

    Gold winner

    The Educate Evidence Aware EdWard

    Winner

    Games for Change

    Best Learning Game Nominee

    Best Mobile App Awards

    Platinum winner

Discover our award-winning app

‘Biggest math fans
we know’

‘One of the best multilingual math education apps’

Apple logo
Forbes logo
  • The Webby Award

    Best Visual Design

    Kidscreen Award

    Best Educational App

    Mom’s Choice Award

    Gold winner

    EdTech Breakthrough

    Best Math Learning Solution

    Horizon Interactive Awards

    Gold winner

    The Educate Evidence Aware EdWard

    Winner

    Games for Change

    Best Learning Game Nominee

    Best Mobile App Awards

    Platinum winner

Discover our award-winning app

‘Biggest math fans
we know’

‘One of the best multilingual math education apps’

Apple logo
Forbes logo
  • The Webby Award

    Best Visual Design

    Kidscreen Award

    Best Educational App

    Mom’s Choice Award

    Gold winner

    EdTech Breakthrough

    Best Math Learning Solution

    Horizon Interactive Awards

    Gold winner

    The Educate Evidence Aware EdWard

    Winner

    Games for Change

    Best Learning Game Nominee

    Best Mobile App Awards

    Platinum winner