Facts

Grown-ups

Facts the Peabody Encyclopedia for kids

What grade are you in?

Real facts about everything, written for your grade.

What grade are you in?

Programmers at Work

How Coding Works: How do people write code?

Read it with Peabody

How do people write code? Let us find out, one step at a time. Start with the computer. It cannot think for itself. So people have to give it instructions. A program is a list of them. People called programmers write the code that makes it.

Next, here is a question: what is code? It is a special language. A computer understands it, and programs are written in it. Now look around you. Games are made with programs. So are websites. So are animation tools.

Think about a recipe. It is a list of steps to follow. A recipe is an algorithm for people. The steps have to be in the right order. A computer does its commands one after another. It does them in the order it is given them. Order matters.

The order of the instructions is called the sequence. Now think about a big job. It can be hard to do all at once. Decomposition means breaking a big problem into smaller parts. That makes it easier to tackle. Think about it for a moment. It is a big job.

Here is a way to save time. A loop makes a computer repeat a set of instructions. A loop lets it do the same kind of job many times. The job does not have to be written out again each time. Look at it this way, then.

Here is how a program can choose. It can make a choice with commands like IF, THEN and ELSE. Here is how it can remember. A variable is like a box that holds a value. The value inside the box can change.

Now for a funny word. A mistake in a program is called a bug. Programmers test it to look for bugs. They can find a bug by checking one small step at a time. Debugging means finding and fixing the bugs.

Here is something to know about mistakes. It is fine to make them in a program. Finding and fixing bugs is a good way to learn. Now here is a question. Do you need a screen to learn about coding? You may have heard that you can only learn about coding on a computer.

In fact, unplugged coding activities use games, cards and puzzles instead of a computer. Last, here is a place to try coding. As of November 2026, Scratch is a coding tool where kids make their own stories, games and animations. Kids can try it out.

Words to know

  • decomposition: breaking into parts
  • loop: a repeat
  • variable: changing box
  • debugging: fixing mistakes
  • sequence: the order

Read next

Sources

For grown-ups: Peabody has no ads, not one, and nothing to sell your child. The Kids Pick, an independent kids' directory, rates its games 90/100. See what other free kids' sites load Β· Grown-ups, sign in Β· Already have a profile?