Question 5

Edexcel Computer Science June 2021 Paper 2GCSE9 marks

On the specification

(a)(i)
1.2 Algorithms
(a)(ii)
6.1 Develop code
(b)
6.3 Data types and structures
(c)(i)
1.2 Algorithms
(c)(ii)
6.1 Develop code
Question text

5 The leisure centre organises a squash competition. Players are ranked in descending order of the points they have scored in matches. The rankings are set after each match. The pseudocode for part of the program used to manage the squash competition is shown. (a) (i) The algorithm includes an error on line 9. Name this type of error. (1) (ii) Give a new line of code that will correct the error. (1) (b) State the type of data structure referred to in the algorithm. (1) (c) (i) Describe how the algorithm could be refined to make it more efficient. (4) (ii) State two changes that could be made to the algorithm to improve the readability of the pseudocode. (2) 1 2 (Total for Question 5 = 9 marks)