Question 10(b)(i) 2016 · May-June · Paper 23 · 64 marks
Reveal official mark-scheme answer
The answer for this question is in the official mark scheme: open the mark scheme.
Show text version of question
Question 10
Part (b)
(i)
Question 10
"River" 10 0 10 0
Alessio now designs the procedures InputScoresAndCalcAverage and UpdatePointsTotals.
Question 11
The social club wants a printout of the competitor names and points totals after each game in rank order (highest points total first).
To do this, Alessio writes a pseudocode procedure:
PROCEDURE SortIntoRankOrder REPEAT NoMoreSwaps ← TRUE FOR x ← 1 TO 9 IF PointsTotal[x] < PointsTotal[x + 1] THEN NoMoreSwaps ← FALSE Temp ← PointsTotal[x] PointsTotal[x] ← PointsTotal[x + 1] PointsTotal[x + 1] ← Temp ENDIF ENDFOR UNTIL NoMoreSwaps = TRUE ENDPROCEDURE
Question 13
(i)
Dry run the procedure call SortIntoRankOrder. Complete the trace table.
NoMore PointsTotal[x] < PointsTotal x Temp Swaps PointsTotal[x+1]
+5 +3 +4 +2 0 +1 -2 -1 -1 -3
TRUE
Question 1
Question 2
Question 3
Question 4
Question 5
Question 6
Question 7
Question 8
Question 9
Question 14
Why this question appears here
71% assigned-topic match · Software development › Program testing and maintenance
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
