Lesson 2.2.1
2.2.1 Programming fundamentals Quiz: OCR Computer Science, Unit 8
20 questions
In partnership with Revision Ninja
Lesson 2.2.1, Programming fundamentals: 20 multiple choice questions for the OCR GCSE Computer Science (J277), Unit 8: Programming fundamentals, written with Revision Ninja.
Host it live on the board and students join with a game code on their own devices, or revise alone with Free Play. The answers are revealed in the game.
The 20 questions
-
Which programming construct is used to execute a block of code repeatedly until a condition is met?
- Iteration
- Sequence
- Assignment
- Selection
-
What term describes data that can change while the program is running?
- Constant
- String
- Integer
- Variable
-
What is 17 MOD 5?
- 2
- 3.4
- 85
- 3
-
What is 2 ^ 3?
- 5
- 9
- 6
- 8
-
Which operator means 'not equal to'?
- !=
- <=
- ==
- >=
-
What describes a count-controlled loop?
- Condition-based loop
- Random termination
- Infinite repetition
- Fixed repetition count
-
Which programming construct allows code to branch based on a condition?
- Assignment
- Selection
- Iteration
- Sequence
-
Which Boolean operator gives TRUE only when both inputs are TRUE?
- AND
- OR
- NAND
- NOT
-
What is the final value of x after x = 3, then x = x + 4, then x = x * 2?
- 14
- 24
- 7
- 10
-
In a Boolean AND operation with one false condition, what is the output?
- Null
- True
- Error
- False
-
How many times does FOR i = 1 TO 5 run its body?
- 4
- 6
- 5
- 1
-
A loop repeats WHILE total < 20. Total starts at 0 and increases by 6 each pass. How many passes run?
- 4
- 3
- 5
- 20
-
If a condition has the Boolean value FALSE, what does NOT give?
- FALSE
- NULL
- TRUE
- Undefined
-
What is 29 DIV 4?
- 7
- 4
- 8
- 1
-
In the assignment statement score <- score + 10, what occurs?
- Score resets to 0
- Score multiplies by 10
- Score decreases by 10
- Score increases by 10
-
Which statement is an output?
- PRINT name
- name <- 'Sam'
- INPUT name
- IF name = 'Sam'
-
A loop counts i from 1 to 10 and adds 1 to a count each time i MOD 2 = 0. What is count at the end?
- 10
- 5
- 4
- 2
-
What are the three core programming constructs combined?
- Variable constant data
- Input process output
- Array record file
- Sequence selection iteration
-
Given x = 5 and y = 3, which expression evaluates to TRUE?
- x > 4 OR y < 2
- x > 4 AND y < 2
- x < 4 AND y > 5
- NOT (x > 4)
-
A loop should count down from 10 to 1. Which loop header is most suitable?
- FOR i = 0 TO 10 STEP 1
- FOR i = 10 TO 1 STEP -1
- WHILE i > 10
- FOR i = 1 TO 10
Related quizzes
- Data types Quiz · 2.2.2 · 20 questions
- Additional programming techniques Quiz · 2.2.3 · 20 questions
- Architecture of the CPU Quiz · 1.1.1 · 20 questions
- Primary storage (memory) Quiz · 1.2.1 · 20 questions
- Networks and topologies Quiz · 1.3.1 · 20 questions
- Threats to computer systems and networks Quiz · 1.4.1 · 20 questions
- Operating systems Quiz · 1.5.1 · 20 questions
- Ethical, legal, cultural and environmental impact Quiz · 1.6.1 · 20 questions
- Computational thinking Quiz · 2.1.1 · 20 questions
- Defensive design Quiz · 2.3.1 · 20 questions