Step by Step: How Computers Follow Your Directions
Have you ever made a peanut butter sandwich? First you get the bread. Then you spread the peanut butter. Then you put the two pieces together and take a bite! You did each step in the right order โ and that is exactly what a computer does every time it runs a program.
What You'll Learn
โข What an algorithm is โข Why the order of steps matters โข How to give clear, step-by-step directions โข How computers use these steps to finish a job
What Is an Algorithm?
An algorithm is just a fancy word for a list of steps, done in order, that finishes a job. Brushing your teeth is an algorithm: wet the toothbrush, add toothpaste, brush for two minutes, rinse, and put the brush away. Every single day, without knowing it, you follow dozens of algorithms!
Order Matters!
What would happen if you put your shoes on BEFORE your socks? It would feel strange and your socks would never get on right! Computers are the same way. If the steps are out of order, the whole job can go wrong, even if every single step is correct on its own.
Before you do a task today, say each step out loud in order, like a computer would. Making your bed, packing your backpack, or setting the table are great ones to try.
Computers Need EVERY Step
People can guess what you mean, but computers cannot. If you tell a robot to 'get the light,' it will not understand. You have to say something exact, like 'move forward two steps, lift your arm, and press the button.' Computer programmers write out every tiny step so the computer never has to guess.
Match each step to its place in the toothbrushing algorithm.
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, that completes a task?
You want to build a tall tower of blocks. Which step should come FIRST?
Robot Director
Write exactly 4 steps to direct a partner from one side of the room to a chair (example: 'take 3 steps forward,' 'turn left,' 'take 2 steps forward,' 'sit down'). Read your steps out loud while your partner acts like a robot and follows ONLY what you say, one step at a time. If they end up in the wrong place, figure out which step was missing or out of order, fix it, and try again.
Real robots that vacuum floors or build cars follow algorithms with thousands of tiny steps โ and if even one step is out of order, the robot can get stuck or do the wrong job.
Want to keep learning?
Sign up for free to access the full curriculum โ all subjects, all ages.
Start Learning Free