Standard difficulty · 20 questions · 40 marks · Time: 42 minutes
Show your working for Sections B and C. Answers are on the last page — try every question first!
Conditions and Loops · AW-9CT-PYF-2026-V1 · For parents — fold back or tear off before handing the sheet to your child.
| Q | Answer | Working |
|---|---|---|
| 1 | (d) [1, 2, 3, 4] | — |
| 2 | (d) A | the first true condition wins: 86 |
| 3 | (c) 20 | i = 8, 12 (13 is not included) |
| 4 | (b) 6 | n ends at 2 |
| 5 | (c) [5, 9, 13] | start at 5, add 4, stop before 15 |
| 6 | (c) big odd | 23 > 19 is true |
| 7 | (a) 4 | multiples of 9 up to 42 |
| 8 | (c) change s = 1 to s = 0 | s must start at 0 |
| 9 | A for loop runs over a fixed sequence (like a range); a while loop repeats as long as a condition is True. | — |
| 10 | 451 | i = 6, 7, 8, 9, 10, 11 |
| 11 | 6561 | 9 → 81 → 729 → 6561 |
| 12 | Can apply | 23 >= 16 is true |
| 13 | 14 | 2 × 7 |
| 14 | 7, 12, 17, 22, 27, 32 | start 7, step 5, stop before 37 |
| 15 | 3, 7, 11, 15, 19, 23 | numbers up to 24 leaving remainder 3 on division by 4 |
| 16 | 208 | numbers above 25: 36, 52, 42, 33, 45 |
| 17 | if m >= 90: print("A") elif m >= 75: print("B") elif m >= 60: print("C") else: print("D"). | — |
| 18 | (a) 26; (b) 5; (c) 4 | last digits: 4, 8, 7, 2, 5 |
| 19 | (a) 2, 4, 6, 8, 10, 12; (b) 6; (c) 15 | range stops before its stop value, so it must be more than 14 |
| 20 | (a) 12; (b) 108; (c) 540 | 12 × (1 + 2 + … + 9) |