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.

Host this setFree Play

The 20 questions

  1. Which relational operator tests whether a value is greater than or equal to another?

    • >=
    • =>
    • !=
    • <=
  2. 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
  3. What is the result of NOT TRUE?

    • NULL
    • 1
    • TRUE
    • FALSE
  4. 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
  5. 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
  6. Which data type does a relational operation such as x < y produce?

    • Real/float
    • Boolean
    • String
    • Integer
  7. Which operator tests strict less than?

    • >
    • =
    • <
    • <=
  8. A = 5 and B = 3. What is the result of A > B AND B > 0?

    • 5
    • FALSE
    • 3
    • TRUE
  9. A = 5 and B = 3. What is the result of NOT (A > B)?

    • FALSE
    • 2
    • 5
    • TRUE
  10. X = 4. What is the result of (X > 4) XOR (X < 10)?

    • FALSE
    • 10
    • TRUE
    • 4
  11. For A = TRUE and B = TRUE, what is the result of A XOR B?

    • TRUE
    • NULL
    • 1
    • FALSE
  12. A = FALSE and B = TRUE. What is the result of NOT A AND B?

    • FALSE
    • B alone
    • TRUE
    • A alone
  13. How many rows of a two-input AND truth table give TRUE as the output?

    • 4
    • 1
    • 3
    • 2
  14. 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)
  15. 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
  16. Evaluate (3 > 2) XOR (2 > 1) XOR (1 > 0). What is the result?

    • TRUE
    • 1
    • FALSE
    • 0
  17. 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
  18. 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
  19. 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
  20. x = 7. What is the result of (x < 5) OR (x > 10)?

    • 7
    • TRUE
    • FALSE
    • NULL

All AQA Computer Science quizzes