Lesson 2 of 12

Sequential Flow

Think about your morning routine: wake up, brush teeth, eat breakfast, grab your bag, leave for school. You do each step one after another, in order. That's exactly what sequential flow means in a flowchart.

Sequential flow is the simplest type of flow. Steps execute one at a time, from top to bottom, with no branching or repeating. It's a straight line from Start to End.

How It Works

In sequential flow, the computer follows each step in the exact order shown. It finishes one step completely before moving to the next. There are no choices to make and no steps to repeat — just a straight path through.

Most real programs have a sequential core with branches and loops added in. But many simple tasks are purely sequential. Let's look at an example.

Example: Making a Peanut Butter Sandwich

Here's a flowchart showing the steps to make a peanut butter sandwich. Step through it to see how each step follows the one before it.

Start Get two slices of bread Get peanut butter and knife Spread peanut butter on bread Put the two slices together Cut sandwich in half Serve the sandwich End

Pseudocode: Sequential Flow

Every flowchart can also be written as pseudocode — a simplified version of programming language that's easy to read. Here's what the sandwich flowchart looks like as pseudocode:

Start Get two slices of bread Get peanut butter and knife Spread PB on bread Put slices together Serve sandwich End
BEGIN
  Get two slices of bread
  Get peanut butter and knife
  Spread peanut butter on bread
  Put the two slices together
  OUTPUT "Serve the sandwich"
END

Notice how each line of pseudocode matches exactly one shape in the flowchart. Step through the diagram above and watch how the pseudocode line highlights at the same time!

Why Order Matters

In sequential flow, the order of steps matters. If you tried to spread peanut butter before getting the bread, it wouldn't work! The same is true in programming — steps must happen in the right order to produce the correct result.

Try it: Think about what would happen if you moved "Cut sandwich in half" to before "Put the two slices together." The result would be wrong! Sequential order is everything.

Key Takeaways

  • Sequential flow means steps happen one after another, in order, from top to bottom.
  • There's no branching or repeating — just a straight path from Start to End.
  • The order of steps matters. Rearranging them can change (or break) the result.
  • Pseudocode matches the flowchart line-by-line: each shape = one line of pseudocode.