Lesson 4.4.1.1

4.4.1.1 Problem-solving and algorithms Quiz: AQA Computer Science, Unit 4

20 questions

In partnership with Revision Ninja

Lesson 4.4.1.1, Problem-solving and algorithms: 20 multiple choice questions for the AQA Computer Science (7517), Unit 4: Theory of computation, 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. According to the specification, what key property must every algorithm possess alongside completing a task?

    • It uses pseudo-code
    • It uses recursion
    • It executes concurrently
    • It always terminates
  2. Which programming construct is NOT one of the four standard pseudo-code constructs specified?

    • Iteration
    • Recursion
    • Selection
    • Sequence
  3. What must an algorithm always do for any valid input?

    • Return an integer
    • Terminate
    • Loop indefinitely
    • Use recursion
  4. Which of these is NOT one of the standard pseudo-code constructs in the specification?

    • Assignment
    • Garbage collection
    • Selection
    • Iteration
  5. What graphical technique uses boxes and arrows to represent program flow and operations?

    • Flowchart
    • Karnaugh map
    • State transition diagram
    • Syntax tree
  6. What is manually tracking variable values step-by-step through an algorithm called?

    • Syntax checking
    • Dry-compiling
    • Hand-tracing
    • Code profiling
  7. Trace: x = 3, then while x < 10 set x = x * 2. What is the final value of x?

    • 6
    • 8
    • 10
    • 12
  8. Algorithm: total = 0, then for i from 1 to 4 add i to total. What is the final total?

    • 4
    • 10
    • 24
    • 7
  9. Ann, Ben and Cat: exactly one of them tells the truth. Ann says Ben is lying. Ben says Cat is lying. Cat says Ann and Ben are both lying. Who tells the truth?

    • Ann
    • Ben
    • Cat
    • No one
  10. How many times is the body of 'for i = 1 to 5' executed?

    • 1
    • 4
    • 5
    • 6
  11. Which pseudo-code selection correctly tests whether the integer n is even?

    • IF n MOD 2 = 0 THEN
    • WHILE n = 2
    • n = n MOD 2 ENDIF
    • IF n DIV 2 THEN
  12. An algorithm finds the largest of a list of 7 values by comparing each item with the current maximum. How many comparisons are made?

    • 7
    • 8
    • 6
    • 49
  13. Which type of test data is essential for revealing edge-case bugs in a sorting algorithm?

    • Unsorted text array
    • Empty list
    • Large random list
    • List of integers
  14. Why would a process containing an infinite loop for a valid input fail to be an algorithm?

    • It lacks variables
    • It never terminates
    • It lacks outputs
    • It uses selection
  15. What predicate condition remains true before and after each loop iteration to help prove loop correctness?

    • Loop variant
    • Base case
    • Exit condition
    • Loop invariant
  16. Does a procedure that fails to halt on certain valid inputs qualify as an algorithm?

    • Yes
    • Only if compiled
    • No
    • Only in pseudo-code
  17. How many different orderings are there of three distinct items?

    • 9
    • 3
    • 6
    • 27
  18. Trace the sequence: start with n = 12. While n > 1, halve n if it is even, otherwise set n = 3n + 1, counting each step. How many steps reach 1?

    • 7
    • 9
    • 5
    • 12
  19. Algorithm A takes 100 steps while Algorithm B takes 10 steps for the same input. Why is B preferred?

    • Fewer variables
    • Higher time efficiency
    • Better accuracy
    • Lower space complexity
  20. Which design technique breaks down a complex problem into smaller, manageable sub-problems?

    • Backtracking
    • Decomposition
    • Abstraction
    • Memoisation

All AQA Computer Science quizzes