Past-paper question · 2023 February-March · Paper 22 · Q11

Question 11 2023 · February-March · Paper 22 · 15 marks

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

Official answer for Question 11

✓
Read and understand the question before starting to mark any scripts. Read the whole answer before marking a script:

Question 15

✓
Check if each requirement listed below has been met.
✓
Requirements may be met using a suitable built-in function from the programming language used (Python, VB.NET or
✓
Java)
✓
On script if requirement met add seen, NE if partial attempt, cross if no attempt (see marked scripts).
✓
Use the tables for A02 and A03 below to award a mark in a suitable band using a best fit approach, then add up the total.
✓
Marks are available for:
✓
to
  • AO2 (maximum 9 marks)
  • AO3 (maximum 6 marks)
✓
Data Structures required with names as given in the scenario
✓
Arrays or lists TeamName, TeamPoints
✓
Variables LeagueSize, MatchNo
✓
Requirements (techniques)
✓
R1 calculates total points for all matches played by each team (nested iteration, totalling)
✓
R2 counts and outputs, with the team’s name, for each team
✓
the total number of away wins, home wins, drawn matches and lost matches
✓
(nested iteration, counting, output)
✓
R3 finds and outputs
✓
the name of the team with the highest number of points and the name of the team with the lowest number of points.
✓
(output, selection)
✓
Cambridge IGCSE – Mark Scheme
✓
0478/22
✓
February/March 2023
✓
PUBLISHED
✓
Question
✓
Answer
✓
Marks

Mark scheme 0478_m23_ms_22.pdf →

Show text version of question

Question 11

The one-dimensional (1D) array TeamName[] contains the names of teams in a sports league. The two-dimensional (2D) array TeamPoints[] contains the points awarded for each match. The position of each team’s data in the two arrays is the same. For example, the team stored at index 10 in TeamName[] and TeamPoints[] is the same.

The variable LeagueSize contains the number of teams in the league. The variable MatchNo contains the number of matches played. All teams have played the same number of matches.

The arrays and variables have already been set up and the data stored.

Each match can be played at home or away. Points are recorded for the match results of each team with the following values:

  • 3 – away win
  • 2 – home win
  • 1 – drawn match
  • 0 – lost match.

Write a program that meets the following requirements:

  • calculates the total points for all matches played for each team
  • counts the total number of away wins, home wins, drawn matches and lost matches for each
  • team

  • outputs for each team:
  • name
  • total points
  • total number of away wins, home wins, drawn matches and lost matches
  • finds and outputs the name of the team with the highest total points
  • finds and outputs the name of the team with the lowest total points.

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.

You do not need to initialise the data in the arrays TeamName[] and TeamPoints[] or the variables LeagueSize and MatchNo

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

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

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

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

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

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

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

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

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

Question 15

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Question 16

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

[15]

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_m23_qp_22.pdf

Keep practising this topic