REVISION GUIDE · IGCSE 0478 PAPER 2
How to answer the 15-mark scenario question
A step-by-step method for the final question of Cambridge IGCSE Computer Science Paper 2, with a worked example in pseudocode.
The last question in Cambridge IGCSE Computer Science (0478) Paper 2 is a 15-mark scenario question. You get an unseen problem and must write a complete algorithm to solve it. It is the biggest single question on the paper, and the one where a clear method makes the most difference.
The key facts
| Marks | 15, the final question of Paper 2 |
| Time to spend | About 30 minutes (the syllabus guidance) |
| Content | Topics 7 to 10: algorithms, programming, databases and Boolean logic. In practice it is mostly arrays, loops, selection, validation, totals and output. |
| Language | Pseudocode, or Python, Visual Basic or Java. This is the only question on Paper 2 where program code is allowed. Other languages score no marks. |
A 6-step method
- Read the whole scenario twice. On the second read, number every task it asks for: input, validate, store, calculate, find, output.
- Note what is already given. Arrays, their names and their sizes are often provided. Use exactly those names and do not redeclare or refill data you were told already exists.
- Plan in 2 minutes. Jot down the variables you need, which loops you need (usually one loop through the records, sometimes a nested loop), and where each task fits.
- Write the algorithm in task order. Initialise totals and counters first, then the loop, then the final outputs after the loop.
- Make every output meaningful. OUTPUT “Average time: “, Average is better than OUTPUT Average. Examiners look for clear, labelled results.
- Check against your numbered list. Tick off each requirement. A missing task means missing marks, however good the rest is.
Worked example
Scenario (practice question written by Revision Hub): A school records race times for 30 students on sports day. The names are already stored in the array StudentName[1:30]. Each student runs 3 races.
Write an algorithm to: input each student’s 3 times, checking each is between 5 and 60 seconds; store the times in a 2D array Times[1:30, 1:3]; calculate and output each student’s average time; and find and output the name and average of the fastest student.
Numbered tasks: (1) input 3 times for each student, (2) validate 5 to 60, (3) store in the 2D array, (4) average per student and output it, (5) find the fastest, (6) output their name and average.
// Given: StudentName[1:30] holds the names
// Times[1:30, 1:3] will store three race times per student
DECLARE Count, Run, BestStudent : INTEGER
DECLARE Time, Total, Average, BestAverage : REAL
BestAverage ← 9999
FOR Count ← 1 TO 30
Total ← 0
FOR Run ← 1 TO 3
REPEAT
OUTPUT "Enter time ", Run, " for ", StudentName[Count]
INPUT Time
IF Time < 5 OR Time > 60
THEN
OUTPUT "Invalid: enter a time from 5 to 60 seconds"
ENDIF
UNTIL Time >= 5 AND Time <= 60
Times[Count, Run] ← Time
Total ← Total + Time
NEXT Run
Average ← Total / 3
OUTPUT StudentName[Count], " average time: ", ROUND(Average, 2)
IF Average < BestAverage
THEN
BestAverage ← Average
BestStudent ← Count
ENDIF
NEXT Count
OUTPUT "Fastest student: ", StudentName[BestStudent]
OUTPUT "Average time: ", ROUND(BestAverage, 2), " seconds"Notice how each task from the list appears in the code. The validation uses a REPEAT … UNTIL loop so the user must re-enter a wrong value, and the error message tells them what is allowed. BestAverage starts at a very large value so the first average always replaces it. The final outputs are labelled and come after the loop.
Mistakes that cost marks
- Ignoring the given arrays or renaming them. Use the exact identifiers in the question.
- Validation that only checks once with IF. Use a loop so invalid data is re-entered.
- Not initialising totals and counters, or resetting a total in the wrong place (it must reset for each student, inside the outer loop).
- Outputs inside the wrong loop, such as printing the fastest student 30 times.
- Off-by-one loops, such as FOR Count ← 0 TO 30 for a 1 to 30 array.
- Leaving tasks out because time ran out. Plan first, and write something for every task.
- Mixing languages, such as Python syntax inside pseudocode. Choose one and stick to it.
How to practise
- Do one full scenario question each week under a 30-minute timer.
- Mark it against your numbered task list, then rewrite any task you missed.
- Learn the standard algorithms well: totalling, counting, finding maximum and minimum, average, linear search and validation loops. Most scenarios are built from these. Revise them in Algorithm design and problem-solving and Programming.
- Use the Coding Lab to run your pseudocode and test it with real values.
- Check what each question is asking with the command words guide.
Frequently asked questions
How long should I spend on the 15-mark scenario question?
The syllabus guidance is about 30 minutes. Leave enough time by working steadily through the earlier questions and starting the scenario with at least half an hour left.
Can I use Python in the IGCSE Computer Science scenario question?
Yes. In the 15-mark scenario question you can use pseudocode, Python, Visual Basic or Java. In the rest of Paper 2, coding answers must be in pseudocode.
What topics come up in the 15-mark question?
It uses topics 7 to 10, so expect arrays, loops, selection, validation, totals, finding the highest or lowest value, averages and clear outputs.
Want feedback on your scenario answers?
Book a free 30-minute online lesson and we will mark a scenario answer together and show you how to pick up the missing marks. Book a free demo →