← IGCSE Computer Science Paper 2

Writing exam answers about algorithms

The exam word that tells you what to write: state the purpose, describe the processes, identify the error, suggest the correction, each in precise terms.

Understanding Writing exam answers about algorithms in IGCSE Computer Science Paper 2

What it does: A precise 'identify' answer gives the line number and the exact fault, here the wrong assignment symbol. The purpose says WHAT the algorithm achieves overall. Listing the steps is describing the processes, which is a different command word. Suggest a correction means give the corrected code. In pseudocode, assignment uses ← while = is used for comparison. Name the missing keyword exactly. Every FOR needs a NEXT, every WHILE an ENDWHILE and every IF an ENDIF. Use symbols in conditions. Relational operators like >= and <= and logical operators like AND give an exact condition. Plain English words are too vague.

Common mistakes: Identify the error: = is used for assignment. In pseudocode a value is assigned with the arrow, so the correction is Grade ← "Fail". Identify the error: the total is not set to zero before totalling, so the answer is 1 too big. Suggest the correction: Total ← 0.

Class: _____________________  ·  Name: _____________________  ·  Date: _________

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.

Learning
Duo
A question says 'State the purpose of the algorithm'. Which answer is best?
It finds the largest of 10 numbers entered by the userIt sets Max to the first number, then uses a FOR loop and an IF to compare each number
Matches
The algorithm uses a loop and an IF and some variables.
↓
Too vague: it lists features of the code but does not say what the algorithm does with the data, so it earns no marks for describing processes.
Applying
Meanings
Term
command word
Meaning
The exam word that tells you what to write: state the purpose, describe the processes, identify the error, suggest the correction, each in precise terms.
Practice
Purpose: counts how many marks are 50 or more
Testing
Gaps
Correction: Count Count + 1
Check Answer
Spots
1INPUT Mark
2Grade = "Fail"

Cloodit turns curriculum-aligned coding content into journeys students work through one biome at a time.

The 'Snow Leopard' badge — Silent Debugger, one of Cloodit's 106 collectible badges
Students earn collectable badges

Over 100 of them, across seven natural biomes.

Study Buddy
Students build a real study resource

Turns their work into revision material ready for Flash Cards and Exam study.

Diamond Dash — one of Cloodit's live, competitive Sprint games
Students lock in with Sprints

Live, competitive practice for the start of the lesson or a teacher-led lesson finisher.

A Cloodit certificate of achievement, ready to personalise and print
Custom printable certificates

Honour your top performers, or encourage a student who's trying hard — ready to print in seconds.

Quick Questions

1. A question says 'State the purpose of the algorithm'. Which answer is best?
A. It sets Max to the first number, then uses a FOR loop and an IF to compare each number
B. It finds the largest of 10 numbers entered by the user ✓
The purpose says WHAT the algorithm achieves overall. Listing the steps is describing the processes, which is a different command word.
2. A question says 'Describe the processes in the algorithm'. Which answer fits?
A. Each mark is added to Total in a loop, then Total is divided by the number of marks ✓
B. It calculates the average mark
Describe the processes means say what the steps do, such as adding in a loop and then dividing. A one-line purpose is not enough.
3. Which answer correctly identifies an error in the line IF Age = > 18 THEN?
A. The algorithm is wrong and does not work
B. The relational operator is written wrongly; it should be > or >= ✓
Identify the error means point to the exact line or symbol and say what is wrong. Vague answers such as 'it does not work' gain no marks.
4. The line Total = 0 is meant to set a variable. What is the correct suggestion to fix it?
A. Replace = with the assignment arrow: Total ← 0 ✓
B. Replace 0 with the word zero
Suggest a correction means give the corrected code. In pseudocode, assignment uses ← while = is used for comparison.
5. A student must identify the error in a loop: FOR Count ← 1 TO 10 with no NEXT. Which is the precise answer?
A. There is no NEXT Count to end the FOR loop ✓
B. The loop is not good
Name the missing keyword exactly. Every FOR needs a NEXT, every WHILE an ENDWHILE and every IF an ENDIF.

Match the Pairs

State the purpose of the algorithm → Write one sentence saying what the algorithm achieves overall, e.g. it finds the largest of 10 numbers entered
Describe the processes in the algorithm → Say what the algorithm does with its data step by step, e.g. it adds each mark to Total and counts the marks
Identify an error: name the exact line and say what is wrong with it → Line 4: = is used for assignment, it should be ←
Suggest a correction: write the replacement code using the right symbols in the condition → Change WHILE Mark > 100 to WHILE Mark >= 100
The algorithm uses a loop and an IF and some variables. → Too vague: it lists features of the code but does not say what the algorithm does with the data, so it earns no marks for describing processes.
Line 6 is wrong because the condition does not work. → Not precise: it does not say what is wrong with the condition, for example that < should be <= so that 100 is included.

Key Term

command word
The exam word that tells you what to write: state the purpose, describe the processes, identify the error, suggest the correction, each in precise terms.

Fill in the Blanks

1. Error: Count = Count + 1 uses = to assign Correction: Count ← Count + 1
Hint: Type the pseudocode symbol used for assignment.
2. Error: Mark > 50 does not include 50 Correction: Mark ≥ 50
Hint: Type the relational operator that means greater than or equal to.
3. Error: OR used in a range check Correction: Age ≥ 11 AND Age ≤ 16
Hint: Type the logical operator that needs both parts of the range to be true.
4. Error: Total is not set to zero first Correction: Total ← 0 before the loop
Hint: Type the starting value a total should have before adding to it.
5. // Purpose: find the largest Mark IF Mark > Largest THEN Largest ← Mark
Hint: Type the relational operator that tests whether the new mark is bigger.

Spot the Error

Question 1
A INPUT Mark
B Grade = "Fail"
C IF Mark >= 50 THEN
D Grade ← "Pass"
E ENDIF
Line B — Identify the error: = is used for assignment. In pseudocode a value is assigned with the arrow, so the correction is Grade ← "Fail".
Question 2
A Total ← 1
B INPUT Mark
C Total ← Total + Mark
D OUTPUT Total
Line A — Identify the error: the total is not set to zero before totalling, so the answer is 1 too big. Suggest the correction: Total ← 0.
Question 3
A Pass ← 0
B INPUT Mark
C // 50 or more is a pass
D IF Mark > 50 THEN
E Pass ← Pass + 1
F ENDIF
Line D — Identify the error: > leaves out a mark of exactly 50, but 50 or more is a pass. Suggest the correction: use the symbol >= in IF Mark >= 50 THEN.
Question 4
A Number ← 1
B WHILE Number < 5 DO
C OUTPUT Number
D Number ← Number - 1
E ENDWHILE
Line D — Identify the error: Number goes down, so Number < 5 is always true and the loop never ends. Suggest the correction: Number ← Number + 1.
Question 5
A INPUT Age
B Price ← 10
C IF Age < 5 AND Age > 65 THEN
D Price ← 0
E ENDIF
F OUTPUT Price
Line C — Identify the error: no age can be both under 5 and over 65, so AND is wrong and the condition is never true. Suggest the correction: use OR.

Student with a class code? Join your class →