Computer ScienceComputingElementaryPrimary
How to teach algorithms
An algorithm is a list of steps, in the right order, that finishes a task. This page explains what an algorithm is for elementary students, with a free activity where a robot follows each student's steps exactly as written.
Jemel Fanfan | Founding Member at Flint

"Flint’s adaptive responses adjust based on each student’s skill level. Because the content aligns with students’ current understanding, they become more engaged and confident in their learning."
Roselyn Baronia, Upper School Computer Science Teacher at Tsinglan SchoolWhy this matters
A young student can say "an algorithm is a list of steps" and still write "make the cereal" as one step. People fill in the missing parts for them every day, so the gap never shows. On a worksheet a skipped step looks fine to the student who wrote it, and the teacher has to wait until grading to find out who left steps out.
What an algorithm is
An algorithm is a list of steps to follow in order to finish a task or solve a problem, and the steps have to be in the right order (BBC Bitesize). A recipe and a set of directions to the park are both algorithms. A computer follows an algorithm exactly as written, so students need three habits:
- Write every step. A person knows to get out a bowl, and a computer only does it when a step says so.
- Put the steps in order. Pouring milk before the bowl is on the table spills the milk.
- Make each step exact. "Keep pouring" never says when to stop.
A step that is missing, out of order or vague makes the computer do the wrong thing. Programmers call that a bug, and finding and fixing it is debugging. The word "algorithm" also has a meaning in AI, covered in our AI glossary entry on algorithms. This page teaches the everyday meaning.
In the Flint activity, each student types numbered steps for an everyday task, and Sparky builds an interactive where Robo, a robot, follows those steps exactly as written. A worksheet can't act out a student's steps, and Robo stops on the first bug so the student can find and fix it.
Sparky gets Leo to find his own missing step
Leo ends up finding his own missing step and explaining why a computer needs every step written out. Everyone in the class gets the same activity, and Sparky's replies depend on each student's own steps.
Leo
Leo
robots are smart, robo will know what i mean.1. get the cereal
2. pour the cereal
3. pour the milk
4. give it to my sister
Sparky

Leo
ok i fixed it. step 2 is now: pour the cereal in the bowl
Sparky
Leo
oh. robo never got a bowl. and it would pour into a closed box too! new steps:1. get a bowl from the cupboard and put it on the table
2. get the cereal
3. open the cereal box
4. pour the cereal in the bowl
5. pour the milk in the bowl
6. give the bowl to my sister
Sparky

Leo
so robo didnt know what i meant. i had to say every step
Sparky
Left out the bowl, fixed two bugs and explained what an algorithm is
Leo is an example student, and Sparky's replies are shortened.
What Flint did for Leo
- Sparky built Robo from Leo's four steps, and Robo poured cereal onto the table at step 2.
- When Leo's fix still gave Robo no bowl, Sparky asked whether Robo got a bowl before step 2.
- After Robo ran Leo's six new steps, Sparky gave Leo a harder task needing a repeated step or if/then rule.
A teacher can't do this by hand for 30 students, and Sparky does it in every student's chat.
The activity page shows who is still leaving steps out
While the class works, Needs attention shows the teacher which student is stuck and on which message. After three or more students submit, activity analytics lists what the class did well, where students went wrong, and a follow-up to practice next.

Example activity page
After a computer science class teaches Robo a task
The school and students are made up for this page.
Set up the activity for free
The Robo activity is in Flint's public library, with Sparky's role, guidelines and greeting already written. Open it, select Use activity to copy it into a free Flint account, and assign it to a class. Students type their steps in the chat, so the activity needs no robot kit or printouts.
For more computer science activities, see Flint for computer science.
Other use cases
See all use cases →ScienceMiddle schoolKey Stage 3

How to teach amplitude and frequency
How to teach amplitude and frequency: what each one changes in a sound wave, and a free Flint activity where students make a note louder without making it higher on a sound wave maker they can hear.
Social StudiesHumanitiesMiddle schoolKey Stage 3

How to teach ancient Egypt
What students need to understand about ancient Egypt and the Nile flood, and a free ancient Egypt activity: students plan a year of shipping limestone to Giza in a spreadsheet Sparky builds, and a student who picks the dry season gets sent back to the canal depth.
Computer ScienceComputingMiddle schoolKey Stage 3

How to teach binary numbers
How to teach binary numbers: place values that double, reading 101 as 5, and why each card is worth twice the one to its right. In a free Flint activity, each student flips binary cards to write their age and a letter, and Sparky answers a wrong count with a question about the cards they flipped.
