Past-paper question · 2016 May-June · Paper 23 · Q3

Question 3 2016 · May-June · Paper 23 · 0 marks

Original past-paper question for 3
Original past-paper question for 3
Reveal official mark-scheme answer

Official answer for Question 3

Part (a)

(i)

PROCEDURE InputScoresAndCalcAverage(BYREF Average : REAL)

[7]
✓
DECLARE x, TotalScore: INTEGER
✓
TotalScore ← 0
✓
FOR x ← 1 TO 10
✓
OUTPUT "Score for", CompetitorName [x]
✓
// input scores into the Score array
✓
INPUT Score [x]
✓
TotalScore ← TotalScore + Score [x]
✓
ENDFOR
✓
Average ← TotalScore / 10
✓
ENDPROCEDURE

Mark scheme 9691_s16_ms_23.pdf →

Show text version of question

Question 3

A
social club organises a competition for ten members. The competition consists of eight games.

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

A
points total is kept for each competitor throughout the competition. At the beginning of the

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

Topic relevance

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

Keep practising this topic