A program is a list of step-by-step instructions. Computers do exactly what you say, nothing more, so every step has to be there.
What is a program?
A program is a list of steps for a computer. Each step tells the computer one thing to do. The computer does the steps in order, one at a time.
A list of steps to finish a task has a special name. It is called an algorithm. When people write an algorithm so a machine can run it, it becomes a program.
Computers do just what you say
Computers are very fast. But they do not guess. They only do the steps you give them.
People are different. If you tell a friend to make a sandwich, your friend fills in the missing parts. A computer can't do that, so a step that seems clear to you may still mix it up.
That is why coders think hard about every step. They ask: What comes first? What comes next? Did I leave anything out?
Steps are all around you
You follow steps every day. Brushing your teeth has steps. You wet the brush, add toothpaste, brush, then rinse.
Planting a seed has steps too. Dig a hole, drop in the seed, cover it with soil, then add water. What if you pour the water before you dig the hole? Oops! Order matters!
The very first bug
A mistake in a program is called a bug. Finding and fixing it is called debugging.
In 1947, a team at Harvard University worked on a big computer called the Mark II. They found a real moth stuck inside one of its parts! They taped the moth into their notebook and wrote: "first actual case of bug being found."
Was that where the word came from? Not quite. The inventor Thomas Edison used "bug" to mean a small problem back in 1878. But the moth made the word famous. Today the notebook, moth and all, belongs to the Smithsonian museum.
Bugs are normal
Here is a big idea: getting a bug does not mean you are bad at coding. Every coder gets bugs, even experts.
Good coders test their steps, find the bug, fix it and try again. Every app, game and website you use was tested and fixed many times. Want to practice? CodeAI (called Code.org until June 2026) has free puzzles where you put steps in order and fix the bugs.
Key words
- Program
- a list of steps that a computer can follow.
- Algorithm
- a list of steps to finish a task.
- Bug
- a part of a program that does not work right.
- Debugging
- finding and fixing problems in a program.
Good to know
- The moth notebook is kept by the National Museum of American History, part of the Smithsonian.
- Grace Hopper, a famous computer scientist, was on the Mark II team. She likely helped make the moth story famous.
- An event is an action that makes something happen, like a click on a button.
- A loop is when a program does something over and over again. Loops save you from writing the same step many times.
Watch more
Unplugged - Real-Life Algorithms: Planting a SeedOpens YouTube in a new tab. Ask a grown-up first.Try it
Write five or fewer steps for drawing a smiley face. Give them to a friend and ask them to follow your steps exactly, with no guessing. Did they draw what you pictured? Fix your bugs and try again.
Quick quiz
Question 1 of 3Sources
- Code.org: CS Fundamentals vocabulary
- Code.org: CS Fundamentals 2020-2021 Express vocabulary
- CodeAI: Code.org has become CodeAI
- GeekWire: Code.org rebrands as CodeAI (June 2, 2026)
- REMC MiTechKids: understanding algorithms
- Smithsonian National Museum of American History: log book with computer bug
- Centre for Computing History: first computer bug is found
- Unplugged - Real-Life Algorithms: Planting a Seed (CodeAI, YouTube)