Structured Programming  «Prev  Next»
Lesson 5 Sequence
Objective Describe the sequence construct

Sequence of Statements

Sequence[1] is the easiest construct of structured programming to understand. It is simply the idea that a program is a sequence of statements that are executed one after the other. In more general terms, we can say that a program performs a sequence of tasks one after the other. For example, consider the following GoForARide program.

Put on cycling clothes
Go for a ride
Remove cycling clothes
Take a shower

For this program to work correctly, the statements must be executed in a particular sequence. More specifically, they must be executed in the order in which they appear in the program. Here is a flowchart of this program that may help you visualize the sequence in which the statements are performed.

Sequence Construct flowchart
Sequence Construct flowchart

In the next lesson we will look at the decision construct.

Program Sequence

Click the link below to read about the concept of the sequence construct.
Program Sequence

[1] Sequence: Control flow construct in which tasks are preformed in a particular order.