Sequence
Statements are carried out one after another in the order they are written, from top to bottom, so changing the order can change the result.
Understanding Sequence in IGCSE Computer Science Paper 2
What it does: A gets its value before B copies it. If the first two lines were swapped, B would copy A before A had been given 5. Sequence means top to bottom, one statement at a time, in the order written. Values must be input before they are used in a calculation, and the calculation must be done before the result is output. The computer does not look ahead. It only uses what has been set by the lines above. Start at the first statement and work down, doing each statement in turn. A starts at 5, becomes 6 on line two, and line three outputs the current value, 6.
Common mistakes: Line 4 outputs Cost before it has been calculated. Statements run top to bottom, so the calculation Cost ← Area * 3 must come before OUTPUT Cost. Line 1 uses Num before it has been input. The INPUT Num statement must come first so that Num has a value when the calculation runs.
Free printable worksheet with full answer key — or add this module to a class and your students practise it interactively.
This module's key terms are also in a printable crossword (Modules 156–165) and word search (Modules 146–165).
Take this worksheet further — free with Cloodit
Each concept is reinforced from every angle — learned, then applied, then tested.
Cloodit turns curriculum-aligned coding content into journeys students work through one biome at a time.
Over 100 of them, across seven natural biomes.
Turns their work into revision material ready for Flash Cards and Exam study.
Live, competitive practice for the start of the lesson or a teacher-led lesson finisher.
Honour your top performers, or encourage a student who's trying hard — ready to print in seconds.
Quick Questions
Match the Pairs
Key Term
sequenceFill in the Blanks
Spot the Error
Student with a class code? Join your class →