Question 10 2025 · October-November · Paper 23 · 15 marks
Reveal official mark-scheme answer
Official answer for Question 10
Question 15
Show text version of question
Question 10
numbers are compared and players are given points based on the result of the comparison.
The two-dimensional (2D) array NumberGenerated[] stores each number generated for each player. The first dimension stores the player number and the second dimension stores the random whole numbers generated.
The game is played as follows:
- 100 random whole numbers between 1 and 6 inclusive are generated for player 1 and stored
in the array.
- 100 random whole numbers between 1 and 6 inclusive are generated for player 2 and stored
- The first number generated for each player is compared and the player with the higher number
- The comparisons repeat for all 100 numbers generated.
- The player with the higher total number of points is output as the winner.
- If the players have the same total number of points, a new random whole number is generated
in the array.
is awarded 2 points. If the two numbers are the same, both players are awarded 1 point each.
for each player and compared. This is repeated until one player has a higher number than the other player. 2 points are added to that player’s total number of points, making this player the winner.
Write a program that meets the following requirements:
- input and validate the names of the two players
- generate 100 random whole numbers between 1 and 6 inclusive for each player and store
- calculate and store the total number of points for each player
- output the name and total number of points for each player in descending order of total
them in the array NumberGenerated[]
number of 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 or variables; assume that this has already been done.
All outputs must contain suitable messages.
..........................................................................................................................................................
..........................................................................................................................................................
..........................................................................................................................................................
..........................................................................................................................................................
..........................................................................................................................................................
..........................................................................................................................................................
..........................................................................................................................................................
..........................................................................................................................................................
..........................................................................................................................................................
.......................................................................................................................................................... * 0000800000013 * DFD
Question 13
, ,
..........................................................................................................................................................
..........................................................................................................................................................
..........................................................................................................................................................
..........................................................................................................................................................
..........................................................................................................................................................
..........................................................................................................................................................
..........................................................................................................................................................
..........................................................................................................................................................
..........................................................................................................................................................
..........................................................................................................................................................
..........................................................................................................................................................
..........................................................................................................................................................
..........................................................................................................................................................
..........................................................................................................................................................
..........................................................................................................................................................
..........................................................................................................................................................
..........................................................................................................................................................
..........................................................................................................................................................
..........................................................................................................................................................
..........................................................................................................................................................
..........................................................................................................................................................
..........................................................................................................................................................
..........................................................................................................................................................
..........................................................................................................................................................
..........................................................................................................................................................
..........................................................................................................................................................
..........................................................................................................................................................
..........................................................................................................................................................
* 0000800000014 * DFD
Question 14
, ,
..........................................................................................................................................................
..........................................................................................................................................................
..........................................................................................................................................................
..........................................................................................................................................................
..........................................................................................................................................................
..........................................................................................................................................................
..........................................................................................................................................................
..........................................................................................................................................................
..........................................................................................................................................................
..........................................................................................................................................................
..........................................................................................................................................................
..........................................................................................................................................................
..........................................................................................................................................................
..........................................................................................................................................................
..........................................................................................................................................................
..........................................................................................................................................................
..........................................................................................................................................................
..........................................................................................................................................................
..........................................................................................................................................................
..........................................................................................................................................................
..........................................................................................................................................................
..........................................................................................................................................................
..........................................................................................................................................................
..........................................................................................................................................................
..........................................................................................................................................................
..........................................................................................................................................................
..........................................................................................................................................................
.......................................................................................................................................................... * 0000800000015 * DFD
Question 15
, ,
..........................................................................................................................................................
..........................................................................................................................................................
..........................................................................................................................................................
..........................................................................................................................................................
..........................................................................................................................................................
..........................................................................................................................................................
..........................................................................................................................................................
..........................................................................................................................................................
..........................................................................................................................................................
..........................................................................................................................................................
..........................................................................................................................................................
..........................................................................................................................................................
..........................................................................................................................................................
..................................................................................................................................................
* 0000800000016 * DFD
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 2210_w25_qp_23.pdf
