Question 3

Edexcel Computer Science June 2021 Paper 2GCSE13 marks

On the specification

(a)
6.2 Program constructs6.5 Operators
(b)(i)
6.2 Program constructs6.3 Data types and structures
(b)(ii)
1.2 Algorithms
Question text

3 The leisure centre runs fitness classes. (a) This is an algorithm used by instructors to check the Body Mass Index (BMI) of people attending their classes. Lines 4 and 22 of the algorithm are incomplete. Complete the algorithm by filling in the boxes. (6) (b) This is an algorithm that processes details of attendance at the fitness classes stored in an array. (i) State the process being carried out at line 7 of the algorithm. (1) (ii) The values in the attendance array are 25, 15, 25, 20, 15 Complete the trace table showing the execution of the algorithm with these five values. You may not need to fill in all the rows in the table. (6) count T M DISPLAY (Total for Question 3 = 13 marks)