Question 3
OCR Computer Science November 2021 Paper 2GCSE24 marks
On the specification
- (a)
- 2.1 Algorithms2.2 Programming techniques
- (b)(i)
- 2.2 Programming techniques
- (b)(ii)
- 2.2 Programming techniques
- (c)(i)
- 2.1 Algorithms2.2 Programming techniques
- (c)(ii)
- 2.1 Algorithms2.2 Programming techniques
- (d)
- 2.1 Algorithms
Question text
3 Taylor is writing an algorithm to record the results of an experiment. Taylor needs to be able to enter a numeric value which is added to a total which initially starts at 0. Every time she enters a value, the total is output. The algorithm repeats until the total is over 100. (a) Write an algorithm to implement Taylor’s requirements. [6] (b) The input to the program could be an integer or real value. (i) State what is meant by a real data type and give an example of this data type. [2] (ii) State what is meant by an integer data type and give an example of this data type. [2] (c) For the next part of the experiment, Taylor needs to be able to enter 10 values and count how many of the values are over 50, outputting this value once all values have been entered. (i) Complete the following flowchart to implement this algorithm. Start Count = INPUT Value No Is Value > 50? Yes Add 1 to Count Have 10 No values been entered? Yes Output End [5] (ii) Write a pseudocode algorithm that uses iteration to allow Taylor to: • enter 10 values • count how many values are over 50 • output the count of values over 50 after all 10 values are entered. [5] (d) Taylor used computational thinking techniques to develop the algorithms. Give two computational thinking techniques that Taylor has used, describing how they have been used. 1 2 [4]