Standard difficulty · 20 questions · 40 marks · Time: 38 minutes
Show your working for Sections B and C. Answers are on the last page — try every question first!
Brief Overview of Python · AW-11IP-PYO-2026-V1 · For parents — fold back or tear off before handing the sheet to your child.
| Q | Answer | Working |
|---|---|---|
| 1 | (d) runs each statement as soon as it is typed at the >>> prompt | — |
| 2 | (c) 7 | ** first (right to left), then * / // %, then + and −, left to right |
| 3 | (a) 11.5 | / always gives a float; Python prints a whole float with .0 |
| 4 | (c) <class 'float'> | — |
| 5 | (a) roll_no | an identifier starts with a letter or _, has only letters, digits and _, and is not a keyword |
| 6 | (a) C | the first true condition, from the top, decides |
| 7 | (c) 12 | i takes 8, 10, 12, 14, 16, 18, 20, 22, 24, 26, 28, 30 |
| 8 | (c) TypeError | a str cannot be joined to an int with + |
| 9 | Interactive mode runs one statement at a time at the >>> prompt; script mode runs a whole program saved in a .py file. | — |
| 10 | x = 0, y = 5 | run each line in turn |
| 11 | 36@26 | end='@' replaces the new line |
| 12 | (a) 27; (b) 29.0; (c) 19 | int() drops the fraction part; float() adds .0; int() turns the text into a number |
| 13 | (a) 18; (b) 0 | the loop subtracts 6 18 times: 108 = 6 × 18 + 0 |
| 14 | 36 | 1 + 2 + … + 8 |
| 15 | 90 | multiples of 9 up to 44: 9 + 18 + 27 + 36 |
| 16 | 0 | 30, 90, 30, 30 % 5 = 0 |
| 17 | + (7 + 2 = 9), − (7 − 2 = 5), * (7 * 2 = 14), / (7 / 2 = 3.5), // (7 // 2 = 3), % (7 % 2 = 1), ** (7 ** 2 = 49). ** is evaluated first (right to left), then *, /, //, %, then + and −, left to right; brackets change the order. | — |
| 18 | (a) 645.0; (b) 1935.0 | 25% of 2580; 2580 − 645.0 |
| 19 | (a) C; (b) B; (c) E | cut-offs 90, 75, 55, 40 |
| 20 | (a) 19 38 57 76 95 114; (b) 399 | 19 × 1 to 19 × 6, then their sum |