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

A plan for your 30 minutes

  1. 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.
  2. Note what you are given. Scenarios often supply arrays or variables that already exist. Use their exact identifiers; don't redeclare or rename them.
  3. 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.
  4. 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.
  5. Write the algorithm in the order it runs: declarations, initialising totals and counters, input and validation, processing, then outputs.
  6. Output exactly what was asked, with clear messages, and include prompts before each INPUT.
  7. 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: ", AboveCount

Dry 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

Practise it on CodeArc

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).