Question 1
OCR Computer Science June 2025 Computational thinking, algorithms and programming (J277-02)GCSE9 marks
On the specification
- (a)
- 2.3 Producing robust programs
- (b)(i)
- 2.2 Programming fundamentals2.3 Producing robust programs
- (b)(ii)
- 2.2 Programming fundamentals
- (b)(iii)
- 2.4 Boolean logic
Question text
1 A program asks a user to enter a number. Only integer values between 1 and 100 (inclusive) are accepted. The program is tested. (a) Tick (✓) one or more boxes in each row to identify the type or types of test for each example of test data. Invalid / Example Normal Boundary erroneous test data test data test data test data 27 "Hello" 105 100 [4] (b) An algorithm is written for the program. (i) Complete the algorithm for the program. num = input("Enter a number between 1 and 100") if num AND then print("accepted") print("not accepted") endif [3] (ii) Give the identifier of one variable used in the algorithm in part (b)(i). [1] (iii) Give one Boolean operator used in the algorithm in part (b)(i). [1]