CAMBRIDGE IGCSE COMPUTER SCIENCE
Summer 2025 · Paper 21 · Question 11 · 15 marks
← 0478 CS Hub Paper 21 · Summer 2025 0478 / Paper 2 Question 11 15 MARKS
15-mark question lab · start here

From five event scores to tournament medals.

Build the solution in a sensible order: understand the three arrays, plan the nested input loop, validate every score between 0 and 100, accumulate each competitor’s total into Points[], award the five event medals with ties included, and crown the overall champion(s). Learn the reasoning before revealing the complete program.

2D arrayInput validationPer-event maximumTie handlingTotalling15 marks

Learning targets

By the end, you should be able to explain the algorithm before writing it.

Lesson overview

01 · Understand

Identify the three arrays, the competitor index shared by CompetitorName[] and CompetitorScore[,], and the 0–100 validity rule every entered score must pass.

02 · Construct

Use nested loops to input and validate each score, accumulate totals into Points[], and track the highest score in every event column.

03 · Complete

Output each event’s medal winner(s) including ties, find the highest total, and crown the champion or champions with suitable messages.

!

How Cambridge awards the marks: the mark scheme gives AO2 a maximum of 9 marks and AO3 a maximum of 6 marks. It lists requirements R1–R5, but does not assign a separate fixed mark total to each R requirement. The stage-to-mark links in this guide show alignment, not invented stage marks.

Source question

Read the whole question first

Do not begin coding after the first paragraph. The 0–100 validation, the tie rule hidden in “the competitor or the competitors”, and the two separate medal searches all shape the structure of the solution.

Question 11 · 15 marks
Cambridge IGCSE Computer Science · 0478/21 · Question 11

The one-dimensional (1D) array CompetitorName[] contains the names of 25 competitors in a tournament that includes five events.

Another two-dimensional (2D) array CompetitorScore[] contains the points scored by each competitor in the five events. The first dimension of this array contains the index of the competitor from CompetitorName[] and the second dimension contains their scores.

Each competitor receives a score out of 100 for each event. These scores are manually entered into CompetitorScore[].

Medals are awarded to the competitor or the competitors who have:

  • the highest points scored in each of the five events
  • the highest total points scored for all five events.

The one-dimensional (1D) array Points[] stores the total number of points scored for each competitor.

Write a program that meets the following requirements:

  • takes as input, valid scores (between 0 and 100), for each competitor in each of the five events
  • calculates the highest points scored for each event
  • outputs the names of the competitors who receive a medal for the highest points scored
  • calculates the highest total points scored for the five events
  • outputs the names of the competitors with the highest total points scored for the five events.

You must use pseudocode or program code and add comments to explain how your code works.

You do not need to declare any arrays or variables.
All inputs and outputs must contain suitable messages.

Before you move on

These are the five required techniques identified by the Cambridge mark scheme.

Mark-scheme map
R1

Take a score for every competitor in every event, rejecting anything below 0 or above 100 until a valid score is entered.

R2

Calculate the highest points scored in each of the five events with a column-by-column maximum scan.

R3

Output the names of the competitors who receive a medal — every competitor whose score equals the event maximum.

R4

Accumulate each competitor’s five validated scores into Points[] and find the highest total.

R5

Output the names of the competitors with the highest total points — the overall champion(s).

Use the tabs along the top to work through the seven stages. The complete solution is kept in its own tab, and the interactive visualisation is the final tab.