Question 9 2024 · May-June · Paper 23 · 15 marks
Reveal official mark-scheme answer
Official answer for Question 9
Question 15
Show text version of question
Question 9
- 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
- calculates and stores the number of points for each team using three points for a win and one
- sorts the array Results[] into descending order of number of points, ensuring the
- 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.
the number of games played
point for a draw; there are no points for a loss
corresponding parallel array Teams[] is kept in the same order
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
..........................................................................................................................................................
..........................................................................................................................................................
..........................................................................................................................................................
..........................................................................................................................................................
..........................................................................................................................................................
..........................................................................................................................................................
..........................................................................................................................................................
..........................................................................................................................................................
..........................................................................................................................................................
..........................................................................................................................................................
..........................................................................................................................................................
..........................................................................................................................................................
..........................................................................................................................................................
..........................................................................................................................................................
..........................................................................................................................................................
..........................................................................................................................................................
..........................................................................................................................................................
..........................................................................................................................................................
..........................................................................................................................................................
..........................................................................................................................................................
..........................................................................................................................................................
..........................................................................................................................................................
..........................................................................................................................................................
..........................................................................................................................................................
..........................................................................................................................................................
..........................................................................................................................................................
..........................................................................................................................................................
..................................................................................................................................................
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.
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
