Past-paper question · 2024 May-June · Paper 21 · Q10

Question 10 2024 · May-June · Paper 21 · 15 marks

Original past-paper question for 10
Original past-paper question for 10
Original past-paper question for 10
Original past-paper question for 10
Reveal official mark-scheme answer Official mark-scheme answer for 10

Official answer for Question 10

✓
Data structures required:

Question 15

✓
The names underlined must match those given in the scenario:
✓
Arrays or lists Clubs[], Statistics[], Points[], TieIndex[]
✓
Variables
✓
Matches, Won, Drawn, Lost, Counter, Maximum, TieCheck, OutLoop, Max, Count
✓
Requirements (techniques):
✓
R1 Input and store number of matches, cricket club names, number of matches won, drawn and lost. Validation of number
✓
of matches played and matches won, lost and drawn against number of matches played (with prompts, iteration,
✓
storing data in variables, validation, 1D and 2D arrays).
✓
R2 Calculate and store the number of points for each cricket club. Finding the index of the array with the highest score /
✓
highest score (calculation, finding the maximum, iteration).
✓
R3 Identifying cricket clubs with highest number of points and whether there is a tie for the top position. Output with
✓
appropriate messages (iteration, selection and output).
✓
0478/21
✓
Cambridge IGCSE – Mark Scheme
✓
May/June 2024
✓
PUBLISHED
✓
Question
✓
Answer
✓
Marks

Mark scheme 0478_s24_ms_21.pdf →

Show text version of question

Question 10

The one-dimensional (1D) array Clubs[] is used to store the names of 12 cricket clubs in a local sports league.

The two-dimensional (2D) array Statistics[] is used to store, for each cricket club, the number of:

  • matches won
  • matches drawn
  • matches lost.

The 1D array Points[] is used to store the total number of points each cricket club has been awarded.

The position of any cricket club’s data is the same in all three arrays. For example, the data in index 2 of Statistics[] and index 2 of Points[] belongs to the cricket club in index 2 of Clubs[]

The variable Matches stores the number of matches played by each team. Each team plays the same number of matches.

Points are awarded for:

  • a win – 12 points
  • a draw – 5 points
  • a loss – 0 points.

Write a program that meets the following requirements:

  • allows the number of matches played to be input and stored, with a maximum of 22 matches
  • validates the number of matches played
  • allows the names of the cricket clubs to be input and stored
  • allows the number of matches won, drawn and lost to be input and stored for each team
  • validates the number of matches won, drawn or lost against the number of matches played
  • asks the user to re-enter the number of matches won, drawn or lost if the total does not match
  • the number of matches played

  • calculates and stores the total number of points for each club
  • finds the cricket club or clubs with the highest number of points
  • outputs the name or names of the winning club or clubs, the number of wins and the total

number of points awarded.

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; you may assume that this has already been done.

All inputs and outputs must contain suitable messages.

..........................................................................................................................................................

..........................................................................................................................................................

..........................................................................................................................................................

..........................................................................................................................................................

..........................................................................................................................................................

..........................................................................................................................................................

Question 13

..........................................................................................................................................................

..........................................................................................................................................................

..........................................................................................................................................................

..........................................................................................................................................................

..........................................................................................................................................................

..........................................................................................................................................................

..........................................................................................................................................................

..........................................................................................................................................................

..........................................................................................................................................................

..........................................................................................................................................................

..........................................................................................................................................................

..........................................................................................................................................................

..........................................................................................................................................................

..........................................................................................................................................................

..........................................................................................................................................................

..........................................................................................................................................................

..........................................................................................................................................................

..........................................................................................................................................................

..........................................................................................................................................................

..........................................................................................................................................................

..........................................................................................................................................................

..........................................................................................................................................................

..........................................................................................................................................................

..........................................................................................................................................................

..........................................................................................................................................................

..........................................................................................................................................................

..........................................................................................................................................................

..........................................................................................................................................................

Question 14

..........................................................................................................................................................

..........................................................................................................................................................

..........................................................................................................................................................

..........................................................................................................................................................

..........................................................................................................................................................

..........................................................................................................................................................

..........................................................................................................................................................

..........................................................................................................................................................

..........................................................................................................................................................

..........................................................................................................................................................

..........................................................................................................................................................

..........................................................................................................................................................

..........................................................................................................................................................

..........................................................................................................................................................

..........................................................................................................................................................

..........................................................................................................................................................

..........................................................................................................................................................

..........................................................................................................................................................

..........................................................................................................................................................

..........................................................................................................................................................

..........................................................................................................................................................

..........................................................................................................................................................

..........................................................................................................................................................

..........................................................................................................................................................

..........................................................................................................................................................

..........................................................................................................................................................

..........................................................................................................................................................

..................................................................................................................................................

[15]

Question 15

Question 16

reasonable effort has been made by the publisher (UCLES) to trace copyright holders, but if any items requiring clearance have unwittingly been included, the publisher will be pleased to make amends at the earliest possible opportunity.

To avoid the issue of disclosure of answer-related information to candidates, all copyright acknowledgements are reproduced online in the Cambridge Assessment International Education Copyright Acknowledgements Booklet. This is produced for each series of examinations and is freely available to download at www.cambridgeinternational.org after the live examination series.

Cambridge Assessment International Education is part of Cambridge Assessment. Cambridge Assessment is the brand name of the University of Cambridge Local Examinations Syndicate (UCLES), which is a department of the University of Cambridge.

Topic relevance

Why this question appears here

98% assigned-topic match · Programming › Arrays

Topic-match percentages estimate how closely each question fits the selected syllabus topic. They are a guide for choosing stricter or broader practice.

Permanent source page: Educate A Change · From 0478_s24_qp_21.pdf

Keep practising this topic