Standard difficulty · 20 questions · 40 marks · Time: 37 minutes
Show your working for Sections B and C. Answers are on the last page — try every question first!
Getting Started with Python · AW-11CS-PYB-2026-V1 · For parents — fold back or tear off before handing the sheet to your child.
| Q | Answer | Working |
|---|---|---|
| 1 | (d) a high-level, interpreted language | — |
| 2 | (d) 4 | brackets first, then // and % from left to right |
| 3 | (a) <class 'str'> | the value is of type str |
| 4 | (b) ScoreName | starts with a letter or _, then letters, digits or _ only, and is not a keyword |
| 5 | (a) in | in is reserved by Python |
| 6 | (b) 30 0 | run each line in turn; x //= k floors towards minus infinity |
| 7 | (a) 59 | int() drops the fraction of the quotient |
| 8 | (b) True | or is true if either comparison is true |
| 9 | Keywords (if), identifiers (marks), literals (25, 'hi'), operators (+, ==) and punctuators (:, (, ,). | — |
| 10 | (a) −2; (b) −21 | a = 23, b = −22: // rounds down (towards minus infinity), and a = b × (a // b) + a % b |
| 11 | x = 12, y = 9 | in x, y = …, both right-hand values are worked out before either name changes |
| 12 | 67 | both are converted to int first |
| 13 | syntax error | Python refuses to run it: a rule of the language is broken |
| 14 | a, d | the left side of = must be a name (an l-value), not a value or an expression |
| 15 | (a) 8*57*2; (b) 8#57 | sep goes between the values; end replaces the newline |
| 16 | (a) 15.0; (b) 9 | an int mixed with a float becomes a float; True counts as 1 and False as 0 |
| 17 | Numbers: int 25, float 2.5, complex 3 + 2j; bool True; sequences: str 'hi', list [1, 2], tuple (1, 2); None; mapping: dict {'a': 1}. | — |
| 18 | (a) 1; (b) 1; (c) 100; (d) 109 | 10 = 9 × 1 + 1; str + str joins text |
| 19 | (a) 266; (b) 88.66666666666667; (c) True | 266 ÷ 3; / always gives a float |
| 20 | (a) line 5; (b) runtime error; (c) print('Area:', area); (d) Area: 120 / Perimeter: 46 | it stops with TypeError |