Jump to content

KS3 Computing/Sequence

From Wikibooks, open books for an open world

Sequence

[edit | edit source]

Sequence is simply writing the steps (or instructions) in a program in the order they need to happen.
For example:

 Step 1 - Boil kettle
 Step 2 - Put teabag in cup
 Step 3 - Pour boiling water into cup
 Step 4 - Stir with spoon
 Step 5 - Remove teabag
 Step 6 - Add milk
 Step 7 - Add sugar
 Step 8 - Stir again
 Step 9 - Drink & enjoy! 

The order these instructions must happen in is important to get right. This order is called a 'sequence' in programming - these instructions must happen in the correct sequence.

It would be no good trying to do step 5 before step 2 for example!