Skip to content

Sequencing and Program Flow

Beginning of the lesson

Sequencing and Program Flow

Doing things in the right order, one step at a time

Big Idea: A program is a list of steps. The computer does them in order — from the top to the bottom, one after another. The order you put the steps in decides what happens!
By the end you will be able to:
  • say what a sequence is,
  • read steps from top to bottom and tell what happens first, next, and last,
  • explain why changing the order changes the result.

1. What is a sequence?

A sequence is a set of steps done in order, one after another. Each single step is called an instruction.

A computer does not do everything at once. It starts at the first instruction, finishes it, then moves to the next one, then the next — all the way down the list. This is called program flow: the path the computer takes as it moves through the steps.

Think of counting to three. You say "one", then "two", then "three". You cannot say all three at the exact same time, and saying them out of order would sound wrong. A computer works the same way — one step at a time, in order.

2. Steps run from top to bottom

When we write a program, we stack the steps in a list. The computer always starts at the top and works its way down to the bottom.

1Wake up2Get dressed3Eat breakfast4Go to school
The computer runs the steps in order, from the top box down to the bottom box.

Read the boxes from top to bottom: first you wake up, next you get dressed, then you eat breakfast, and last you go to school. The computer follows a program the very same way.

Continue this lesson on YourAIZone

The full lesson has the complete explanation, worked examples, common mistakes, tests with instant checking and an AI tutor. Start right away as a guest, or create an account to keep your progress.

In the full lesson

  • The complete explanation
  • Worked examples
  • Common mistakes and how to avoid them
  • Test questions: 15
  • AI tutor that answers questions about the topic
  • Progress tracking for students, parents and teachers