๐Ÿ“œ
Coding๐Ÿš€ Ages 7-10Beginner 8 min read

What Is a Program?

A clear primary lesson explaining what a computer program is: a list of instructions a computer follows in order. Real examples, code, and a hands-on quiz.

Key takeaways

  • A program is a list of instructions that a computer follows step by step
  • Computers do exactly what the program says, in the exact order, with no guessing
  • Programs are written in coding languages like Scratch, Python or JavaScript
  • A small program can be just a few lines; big apps are millions of lines working together

A program is a list of instructions

A program is a list of instructions that a computer follows, one step at a time.

That is the whole big idea! A program tells the computer exactly what to do, and the computer does it. Whether it is a game, a calculator, or a video app, every program is really just a set of instructions written by a person.

If you want the big-picture view of what coding is all about, read what is coding too.

Computers follow instructions exactly

Here is the most important thing to understand about computers: they do exactly what the program says, in exactly the order it says, and they never guess.

Imagine you wrote instructions for a friend to make a jam sandwich:

1. Put jam on the bread
2. Take two slices of bread

A friend would laugh and figure out the right order. But a computer would put jam on the table, because there is no bread yet! It follows step 1 first, exactly as written.

This is why coders have to be careful and clear. The computer is fast and powerful, but it does not understand what you meant โ€” only what you said. To learn how to put steps in the right order, see sequences: putting steps in order.

A real tiny program

Let's look at a real program. Here is one written in Python, a popular coding language:

print("Hello!")
print("I am a program.")
print("I do exactly what I am told.")

When the computer runs this program, it reads the lines from top to bottom and does each one. The output is:

Hello!
I am a program.
I do exactly what I am told.

Each print line is an instruction that means "show this text on the screen." The computer does line 1, then line 2, then line 3. Simple, clear, and in order.

The same idea in Scratch

You do not have to type to write a program. In Scratch, you snap colored blocks together. The blocks are still instructions, just like the Python lines. Here is a Scratch program:

when green flag clicked
say "Hello!" for 2 seconds
move 10 steps
say "I am a program too!" for 2 seconds

When you click the green flag, the cat says hello, moves a little, and speaks again. Same idea, different tool. The computer follows each block in order. You can try it yourself in getting started with Scratch.

Programs are written in languages

People write programs in coding languages. Just as people speak English, Spanish, or Arabic, computers understand languages like:

  • Scratch โ€” a block language, great for beginners.
  • Python โ€” a typed language used for games, science, and websites.
  • JavaScript โ€” the language that makes web pages interactive.

Each language has its own words and rules, but they all do the same job: turn your ideas into instructions a computer can follow.

From tiny to huge

A program can be tiny โ€” just one line:

print("Hi")

Or it can be huge. The apps on a phone can have millions of lines of code, all working together. A game might have code for moving characters, keeping score, playing sounds, and saving your progress, all in one big program.

But here is the secret: even the biggest program is built from small, simple instructions, snapped or typed together one after another. If you understand small programs, you are on your way to understanding big ones. Even clever tools like AI are built from programs that people wrote.

Try it: write a program on paper

You do not need a computer to think like a programmer. Try this challenge with a pencil:

  1. Pick a simple task, like brushing your teeth or feeding a pet.
  2. Write the instructions as a numbered list, one tiny step per line.
  3. Now read your list to a grown-up and ask them to do exactly what each line says โ€” no guessing allowed!
  4. Did anything go wrong or look silly? If so, you found a "bug." Fix the order or add a missing step, then try again.

This is exactly what real programmers do: write instructions, test them, and fix them until the program works. You just wrote and debugged your first program โ€” no screen required! ๐Ÿ“œ

Quick quiz

Test yourself and earn XP

What is a computer program?

How does a computer follow a program?

What happens if two steps are in the wrong order?

Which of these is a coding language used to write programs?

About how many lines of code can a big app have?

FAQ

They are almost the same. 'Program' is the general word for instructions a computer follows. An 'app' is a program made for people to use, like a game or a messaging app.

People called programmers or coders write programs. With tools like Scratch, kids can write real programs too!