The 15-mark scenario question in 0478 and 2210 Computer Science Paper 2
0478 · 2210 · Published 2026-11-13
How this was made: Written by AI and checked by AI, including Anthropic's Claude, against the official Cambridge syllabus (0478/2210, 2026–2028, version 6). It may contain mistakes and we revise it when errors are found — spot one? Email [email protected].
The last question on Paper 2 (Algorithms, Programming and Logic) is worth 15 of the paper's 75 marks. It is an unseen scenario: you are given a context and asked to write an algorithm for it. The 2026–2028 syllabus says you should expect to spend about 30 minutes on it, out of the 1 hour 45 minutes for the whole paper. The same question appears in Cambridge IGCSE Computer Science (0478) and O Level Computer Science (2210), which share the same content and paper structure.
What makes this question different
- Language choice. Everywhere else on Paper 2, coded answers must be in pseudocode, and answers written in a programming language get no marks. In the scenario question only, you may answer in pseudocode or in Python, Visual Basic or Java. Any other language gets no marks.
- It draws on topics 7 to 10: algorithm design, programming, databases and Boolean logic. In practice the scenario tests algorithm design and programming most heavily.
- Logic matters more than syntax. The syllabus says knowledge of language syntax is not examined: what counts is whether your algorithm does what the scenario asks.
- Precision is required. The syllabus gives the example that x > y is acceptable but 'x is greater than y' is not. Write real conditions, not sentences.
A plan for your 30 minutes
- Read the scenario twice and number every requirement. Each 'the program must…' is usually a separate thing to deliver: an input, a check, a calculation, an output.
- Note what you are given. Scenarios often supply arrays or variables that already exist. Use their exact identifiers; don't redeclare or rename them.
- Match each requirement to a standard method. The syllabus limits these to linear search, bubble sort, totalling, counting, and finding the maximum, minimum and average. Most scenarios are a combination of them.
- Add validation wherever the scenario says input must be checked: a range, length, type, presence or format check, usually inside a REPEAT … UNTIL loop so a bad value is asked for again.
- Write the algorithm in the order it runs: declarations, initialising totals and counters, input and validation, processing, then outputs.
- Output exactly what was asked, with clear messages, and include prompts before each INPUT.
- Check it against your numbered list and dry-run it with two or three values, including a boundary value.
Worked example
Scenario (our own, written in the style of the question): a teacher stores the names of a class of 30 students in the array StudentName[1:30]. Write an algorithm that inputs a test mark from 0 to 100 for each student and rejects any other value. It must store the marks, then output the class average to one decimal place, the highest mark and who scored it, and how many students scored above the average.
Requirements: (1) input 30 marks, (2) validate 0–100, (3) store marks, (4) average to 1 d.p., (5) highest mark and name, (6) count above average. Standard methods: totalling, maximum, average, counting. Validation: a range check.
CONSTANT ClassSize ← 30
DECLARE Mark : ARRAY[1:30] OF INTEGER
DECLARE Total : INTEGER
DECLARE Highest : INTEGER
DECLARE TopStudent : STRING
DECLARE Average : REAL
DECLARE AboveCount : INTEGER
DECLARE Index : INTEGER
// StudentName[1:30] already holds the names (given in the question)
Total ← 0
Highest ← -1
FOR Index ← 1 TO ClassSize
REPEAT
OUTPUT "Enter the mark for ", StudentName[Index], " (0 to 100)"
INPUT Mark[Index]
IF Mark[Index] < 0 OR Mark[Index] > 100
THEN
OUTPUT "Invalid: a mark must be from 0 to 100"
ENDIF
UNTIL Mark[Index] >= 0 AND Mark[Index] <= 100
Total ← Total + Mark[Index]
IF Mark[Index] > Highest
THEN
Highest ← Mark[Index]
TopStudent ← StudentName[Index]
ENDIF
NEXT Index
Average ← Total / ClassSize
AboveCount ← 0
FOR Index ← 1 TO ClassSize
IF Mark[Index] > Average
THEN
AboveCount ← AboveCount + 1
ENDIF
NEXT Index
OUTPUT "Class average: ", ROUND(Average, 1)
OUTPUT "Highest mark: ", Highest, " by ", TopStudent
OUTPUT "Students above the average: ", AboveCountDry run with five students instead of thirty (marks 72, 58, 91, 64, 80): the total is 365, the average is 73.0, the highest mark is 91, and two students (91 and 80) are above the average. Notice that the count needs a second loop: the average is not known until every mark has been entered.
Mistakes that cost marks
- Forgetting to initialise totals and counters (Total ← 0) before the loop.
- Starting the maximum at a value that a real mark could fall below. Starting at -1 works here because every valid mark is 0 or more; for data that can be negative, start from the first element instead.
- Validating once with an IF, so a second bad value slips through. Use a loop that repeats until the value is valid.
- Computing the average inside the input loop, or dividing by the wrong count.
- Missing an output the scenario asked for, or outputting values with no message.
- Mixing languages: half pseudocode, half Python. Pick one for the whole answer.
Practise it on CodeArc
- Algorithm design: standard methods of solution (2210)
- Validation, verification and test data (2210)
- Trace tables, errors and writing algorithms (2210)
- Programming: variables, selection and iteration (2210)
- Arrays (2210)
- Algorithm design and problem-solving — IGCSE 0478
Cambridge's Paper 2 specimen paper and mark scheme (for first assessment from 2023) include an example scenario question with an indicative 15-mark response. Ask your teacher for them, or find them on the 0478 or 2210 syllabus page on the Cambridge International website.
Questions
Can I answer the 0478 scenario question in Python?
Yes. In the 15-mark scenario question only, you may answer in pseudocode, Python, Visual Basic or Java. Everywhere else on Paper 2, coded answers must be in pseudocode.
How long should I spend on the scenario question?
The 0478 and 2210 syllabus expects about 30 minutes for the 15-mark scenario question, out of 1 hour 45 minutes for Paper 2.
Is the 2210 scenario question the same as 0478?
Yes. O Level 2210 and IGCSE 0478 share the same subject content and paper structure for 2026–2028; only the grade scale differs (2210 is graded A* to E, 0478 A* to G).