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.
The 20 questions
-
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
-
Which programming construct is NOT one of the four standard pseudo-code constructs specified?
- Iteration
- Recursion
- Selection
- Sequence
-
What must an algorithm always do for any valid input?
- Return an integer
- Terminate
- Loop indefinitely
- Use recursion
-
Which of these is NOT one of the standard pseudo-code constructs in the specification?
- Assignment
- Garbage collection
- Selection
- Iteration
-
What graphical technique uses boxes and arrows to represent program flow and operations?
- Flowchart
- Karnaugh map
- State transition diagram
- Syntax tree
-
What is manually tracking variable values step-by-step through an algorithm called?
- Syntax checking
- Dry-compiling
- Hand-tracing
- Code profiling
-
Trace: x = 3, then while x < 10 set x = x * 2. What is the final value of x?
- 6
- 8
- 10
- 12
-
Algorithm: total = 0, then for i from 1 to 4 add i to total. What is the final total?
- 4
- 10
- 24
- 7
-
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
-
How many times is the body of 'for i = 1 to 5' executed?
- 1
- 4
- 5
- 6
-
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
-
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
-
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
-
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
-
What predicate condition remains true before and after each loop iteration to help prove loop correctness?
- Loop variant
- Base case
- Exit condition
- Loop invariant
-
Does a procedure that fails to halt on certain valid inputs qualify as an algorithm?
- Yes
- Only if compiled
- No
- Only in pseudo-code
-
How many different orderings are there of three distinct items?
- 9
- 3
- 6
- 27
-
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
-
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
-
Which design technique breaks down a complex problem into smaller, manageable sub-problems?
- Backtracking
- Decomposition
- Abstraction
- Memoisation
Related quizzes
- Abstraction Quiz · 4.4.1.3 · 20 questions
- Problem reduction and decomposition Quiz · 4.4.1.8 · 20 questions
- Composition Quiz · 4.4.1.10 · 20 questions
- Automation Quiz · 4.4.1.11 · 20 questions
- Finite state machines Quiz · 4.4.2.1 · 20 questions
- Regular expressions Quiz · 4.4.2.3 · 20 questions
- Backus-Naur Form and syntax diagrams Quiz · 4.4.3.1 · 20 questions
- Comparing algorithms Quiz · 4.4.4.1 · 20 questions
- Order of complexity Quiz · 4.4.4.3 · 20 questions
- Limits of computation and computable problems Quiz · 4.4.4.4 · 20 questions