Question 1
OCR Computer Science June 2023 Computational thinking, algorithms and programming (J277-02)GCSE11 marks
On the specification
- (a)
- 2.5 Programming languages and IDEs
- (b)
- 2.2 Programming fundamentals
- (c)(i)
- 2.2 Programming fundamentals
- (c)(ii)
- 2.2 Programming fundamentals
- (c)(iii)
- 2.2 Programming fundamentals
- (d)
- 2.1 Algorithms2.2 Programming fundamentals
Question text
1 (a) The table contains four statements about programming languages. Tick (3) one box in each row to identify whether each statement describes a low-level programming language or a high-level programming language. Statement Low-level High-level The same language can be used on computers that use different hardware It allows the user to directly manipulate memory It allows the user to write English-like words It always needs to be translated into object code or machine code [4] (b) The variables num1 and num2 store integers. Write pseudocode to add the integers stored in num1 and num2. Store the result in a variable with the identifier total [1] (c) Three incomplete pseudocode algorithms are given with a description of the purpose of each algorithm. Write the missing arithmetic operator for each algorithm. (i) Outputting 12 to the power of 2. print(12 2) [1] (ii) Working out if a number is odd or even. number = 53 if number 2 == 0 then print("Even number") else print("Odd number") endif [1] (iii) Finding the difference between two measurements. measurement1 = 300 measurement2 = 100 difference = measurement1 measurement2 [1] (d) Read the following pseudocode algorithm: 1 start = 3 2 do 3 print(start) 4 start = start - 1 5 until start == -1 6 print("Finished") Complete the following trace table for the given algorithm. Line number start Output [3]