Question 1

OCR Computer Science June 2022 Computational thinking, algorithms and programming (J277-02)GCSE7 marks

On the specification

(a)
2.2 Programming fundamentals
(b)
2.2 Programming fundamentals
(c)
2.1 Algorithms
Question text

1 (a) Tick (3) one box in each row to identify whether the OCR Reference Language code given is an example of selection or iteration. OCR Reference Language code Selection Iteration for i = 1 to 10 print(i) next i while score != 0 playgame() endwhile if playerHit() then score = 0 endif switch bonus: case 0: score = 9 case 1: score = 7 case 2: score = 5 endswitch [4] (b) Write pseudocode to increment the value held in the variable score by one. [1] (c) State the name of each of the following computational thinking techniques. Breaking a complex problem down into smaller problems. Hiding or removing irrelevant details from a problem to reduce the complexity. [2]