Question 3 2016 · May-June · Paper 23 · 0 marks
Reveal official mark-scheme answer
Official answer for Question 3
Part (a)
(i)
PROCEDURE InputScoresAndCalcAverage(BYREF Average : REAL)
Show text version of question
Question 3
All ten competitors take part in all games.
At the end of each game, each competitor is awarded a score.
For example, after the first game, the following scores were recorded:
Game 1 Competitor Score Rowan 23 Hema 14 Kai 10 Ellis 76 Rory 43 Arden 23 Quinn 30 Charles 16 Avery 34 River 31
The average score for each game is calculated.
For example, the average score for Game 1 was 30.
Each individual competitor’s score is compared to the average score for that game.
Each competitor is awarded a points value as follows:
- −1 for a score below the average
- +1 for a score above the average
- 0 for a score equal to the average
Therefore, in the given example, competitors receive the following points:
Game 1 Competitor Points Rowan –1 Hema –1 Kai –1 Ellis +1 Rory +1 Arden –1 Quinn 0 Charles –1 Avery +1 River +1
Question 10
competition each competitor’s points total is 0. After each game, each member’s points total is updated.
After all 8 games, the highest possible points total is +8 (better than average in all games); the lowest possible points total is –8 (worse than average in all games).
The competitor with the highest points total at the end of the competition is the winner.
The social club asks Alessio to write a program to:
- input each competitor’s score after each game
- update the competitors’ points totals
Alessio writes top-level pseudocode:
PROCEDURE GameResultUpdate CALL InputScoresAndCalcAverage(Average) CALL UpdatePointsTotals(Average) ENDPROCEDURE
The procedure Initialisation sets up arrays CompetitorName, Score and PointsTotal as follows:
CompetitorName Score PointsTotal 1 "Rowan" 1 0 1 0 2 "Hema" 2 0 2 0 3 "Kai" 3 0 3 0
Why this question appears here
76% assigned-topic match · Data types and structures › 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 9691_s16_qp_23.pdf
