Follow the Steps! Coding Hiding in Your Day
Every morning, you brush your teeth in the same order: wet the brush, add toothpaste, brush, rinse, spit. You never brush before you wet the brush! That exact list of steps, done in order, is called an algorithm โ and it's the same idea computers use to do everything from playing a video to turning on a stoplight. You have been coding your whole life without even knowing it.
What You'll Learn
- What an algorithm is - Why the ORDER of steps matters - How to spot algorithms all around you - How to write your own step-by-step algorithm
What Is an Algorithm?
An algorithm is just a list of steps, done in order, to finish a job. Making a peanut butter sandwich is an algorithm: get two pieces of bread, open the peanut butter, spread it on one piece, put the pieces together. If you did the steps out of order โ like putting the pieces together BEFORE spreading the peanut butter โ the sandwich would not work right! Computers follow algorithms too. A traffic light follows an algorithm: green, then yellow, then red, then back to green. It always happens in that exact order, every single time.
Algorithms Are Everywhere You Look
Think about your school day. Line up, walk to class, sit down, take out your book โ that's an algorithm your teacher taught you. A washing machine follows an algorithm too: fill with water, add soap, spin, drain, spin again. Even a recipe for cookies is an algorithm: mix the dry ingredients, mix the wet ingredients, combine them, scoop onto a tray, bake. When you give directions to a friend โ "go straight, then turn left at the big tree, then it's the third house" โ you are writing an algorithm with your own words!
Next time you do something with steps โ like getting dressed or feeding a pet โ count how many steps there are and say them out loud in order. That's you thinking like a coder!
Why Order Matters
Here is a silly algorithm for getting dressed, but in the WRONG order: put on your shoes, then put on your socks. That would feel very strange! Computers are exactly the same โ if the steps are out of order, the whole thing breaks, even if every single step is correct on its own. That is why coders are so careful about the ORDER they write their steps in.
Match each everyday task to its FIRST step.
Terms
Definitions
Drag terms onto their definitions, or click a term then click a definition to match.
What do we call a list of steps done in order to finish a job?
Real computer programmers write algorithms using special coding languages, but the IDEA is the exact same as your morning routine: clear steps, done in the right order, every single time.
Why would putting your shoes on BEFORE your socks be a problem for an algorithm?
Write Your Own Algorithm
Pick something you do every day, like getting ready for bed or packing your backpack. Draw or write the steps in order, numbered 1, 2, 3, and so on. Then trade with a partner and see if they can follow YOUR steps exactly, in order, without skipping any.
Want to keep learning?
Sign up for free to access the full curriculum โ all subjects, all ages.
Start Learning Free