Past-paper question · 2024 May-June · Paper 23 · Q9

Question 9 2024 · May-June · Paper 23 · 15 marks

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

Official answer for Question 9

✓
AO2 (maximum 9 marks)

Question 15

✓
AO3 (maximum 6 marks)
✓
Data Structures required with names as given in the scenario:
✓
Arrays or lists Teams[], Results[]
✓
Variables
✓
Played
✓
Requirements (techniques):
✓
R1 Input and store number of games played, teams, number of games won, drawn and lost, with validation for input of
✓
numbers (iteration, range check, input, output).
✓
R2 Calculate and store the number of points. Sort the arrays by number of points (calculation, sort, (nested) iteration).
✓
R3 Finding and outputting top team(s) (finding max, counting and output).
✓
0478/23
✓
Cambridge IGCSE – Mark Scheme
✓
May/June 2024
✓
PUBLISHED
✓
Question
✓
Answer
✓
Marks

Mark scheme 0478_s24_ms_23.pdf →

Show text version of question

Question 9

A
one-dimensional (1D) array Teams[] contains the names of 10 football teams in a local league.
A
two-dimensional (2D) array Results[] stores, for each team, the total number of:
  • games won
  • games drawn
  • games lost
  • points.

The position of any team’s data is the same in both arrays. For example the data in index 3 of Results[] belongs to the team in index 3 of Teams[]

The array data will be used to find the current leader of the league.

The variable Played stores the number of games played by each team. Each team plays the same number of games.

Write a program that meets the following requirements:

  • allows the number of games played to be input and stored, with a maximum of 18 games
  • allows the names of the teams to be input and stored
  • allows the number of games won, drawn and lost to be input and stored for each team
  • validates the number of games played and the number of games won, drawn or lost against
  • the number of games played

  • calculates and stores the number of points for each team using three points for a win and one
  • point for a draw; there are no points for a loss

  • sorts the array Results[] into descending order of number of points, ensuring the
  • corresponding parallel array Teams[] is kept in the same order

  • determines how many teams have the highest number of points
  • outputs the name(s) of the winning team(s) along with the number of points achieved.

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

You do not need to declare any arrays, variables or constants; 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_23.pdf

Keep practising this topic