Lesson 4.1.1.4
4.1.1.4 Relational and Boolean operations Quiz: AQA Computer Science, Unit 1
20 questions
In partnership with Revision Ninja
Lesson 4.1.1.4, Relational and Boolean operations: 20 multiple choice questions for the AQA Computer Science (7517), Unit 1: Fundamentals of programming, 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 relational operator tests whether a value is greater than or equal to another?
- >=
- =>
- !=
- <=
-
A XOR B returns TRUE under which condition?
- Exactly one of A and B is TRUE
- Both A and B are TRUE
- Both A and B are FALSE
- At least one of A and B is FALSE
-
What is the result of NOT TRUE?
- NULL
- 1
- TRUE
- FALSE
-
A AND B is TRUE only when which condition holds?
- Neither A nor B is TRUE
- Both A and B are TRUE
- Exactly one of A and B is TRUE
- At least one of A and B is TRUE
-
A OR B is FALSE only when which condition holds?
- Both A and B are FALSE
- A is FALSE and B is TRUE
- Both A and B are TRUE
- Exactly one of A and B is FALSE
-
Which data type does a relational operation such as x < y produce?
- Real/float
- Boolean
- String
- Integer
-
Which operator tests strict less than?
- >
- =
- <
- <=
-
A = 5 and B = 3. What is the result of A > B AND B > 0?
- 5
- FALSE
- 3
- TRUE
-
A = 5 and B = 3. What is the result of NOT (A > B)?
- FALSE
- 2
- 5
- TRUE
-
X = 4. What is the result of (X > 4) XOR (X < 10)?
- FALSE
- 10
- TRUE
- 4
-
For A = TRUE and B = TRUE, what is the result of A XOR B?
- TRUE
- NULL
- 1
- FALSE
-
A = FALSE and B = TRUE. What is the result of NOT A AND B?
- FALSE
- B alone
- TRUE
- A alone
-
How many rows of a two-input AND truth table give TRUE as the output?
- 4
- 1
- 3
- 2
-
Which expression tests that an age is between 16 and 18 inclusive?
- (age > 16) OR (age < 18)
- (age >= 16) AND (age <= 18)
- (age > 16) AND (age < 18)
- (age >= 16) XOR (age <= 18)
-
x = 12. Which expression is TRUE?
- x MOD 2 = 0 AND x > 10
- x MOD 2 = 1 OR x > 20
- x MOD 2 = 1 AND x > 10
- x MOD 2 = 0 AND x > 20
-
Evaluate (3 > 2) XOR (2 > 1) XOR (1 > 0). What is the result?
- TRUE
- 1
- FALSE
- 0
-
Which expression is equivalent to NOT (A AND B) according to De Morgan's laws?
- NOT A AND NOT B
- NOT A OR NOT B
- A OR B
- NOT A AND B
-
How many of the 8 rows of a three-input truth table give FALSE for the expression A AND B AND C?
- 7
- 8
- 3
- 1
-
A login is accepted only when (length >= 8) AND (containsDigit). The length is 7 and containsDigit is TRUE. What is the outcome?
- TRUE
- 7
- The login is partly accepted
- FALSE
-
x = 7. What is the result of (x < 5) OR (x > 10)?
- 7
- TRUE
- FALSE
- NULL
Related quizzes
- Data types Quiz · 4.1.1.1 · 20 questions
- Programming concepts: sequence, selection and iteration Quiz · 4.1.1.2 · 20 questions
- Arithmetic operations Quiz · 4.1.1.3 · 20 questions
- Constants and variables Quiz · 4.1.1.6 · 20 questions
- String-handling operations Quiz · 4.1.1.7 · 20 questions
- Random numbers and exception handling Quiz · 4.1.1.8 · 20 questions
- Subroutines Quiz · 4.1.1.10 · 20 questions
- Parameters and returning values Quiz · 4.1.1.11 · 20 questions
- Local and global variables Quiz · 4.1.1.13 · 20 questions
- Stack frames in subroutine calls Quiz · 4.1.1.15 · 20 questions