Reading a problem to plan an algorithm
Plan before coding: read the problem, list what is input, what must be calculated or decided, and what is output. Then pick variables and spot repeats and decisions.
Understanding Reading a problem to plan an algorithm in IGCSE Computer Science Paper 2
What it does: Spotting 'enter 30 marks' as a repeat tells you to plan a FOR loop with 30 iterations. Words like 'if' in the problem show a decision. In pseudocode this becomes an IF statement with a condition. The mark is typed in by the user, so it is the input. PASS is the output that the algorithm produces. Planning first means you know what data you need and what the algorithm must produce, so you make fewer mistakes. Calculating or deciding is the process. Showing the result on the screen is the output. Doing something 30 times means a loop is needed. A FOR loop fits because the number of repeats is known.
Common mistakes: An average can have decimal places, so the variable that stores the result must be REAL, not INTEGER. It should be DECLARE Average : REAL. The process is to add up the prices that were input. Item is only the loop counter. The line should be Total ← Total + Price.
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 254–264) and word search (Modules 254–274).
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
Input, Process, OutputFill in the Blanks
Spot the Error
Student with a class code? Join your class →