SEQUENCE
KEY TERM: Statement

First off, we need to be familiar with the concept of a statement. Our first programming example has four statements. One on each line. Generally, that is how it will work. On each line you will write a statement that tells the computer to do something.

We have already used the concept of sequence in our first program, but let's look at pseudocode for a simple real-world task, like making toast.

TAKE BREAD OUT OF PACKET
PLACE BREAD IN TOASTER
TURN TOASTER ON
WAIT UNTIL TOAST COOKED
TAKE BUTTER OUT OF FRIDGE
BUTTER TOAST
ADD VEGEMITE (If you're Australian)

This example has 7 steps, or 7 statements, which you perform in sequence - one after the other. That's all sequence is. A set of steps you do one by one until you've finished the task.

Let's come back to the pseudocode for our first program example.

INPUT A
INPUT B
LET C = A + B
PRINT C

Again, Sequence simply means that each of the four statements will run one after the other. Repeating the sequence of statements in the first program: First we accept a value A from the keyboard. Secondly, we accept a value B from the keyboard. The next step in the sequence is to add the two values and assign the new value to C. The final step is to print the result C to the screen. That's all sequence is; whether you have four statements, seven statements, or a hundred statements.