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!
Introduction to NumPy · AW-11IP-NPY-2026-V1 · For parents — fold back or tear off before handing the sheet to your child.
| Q | Answer | Working |
|---|---|---|
| 1 | (d) Numerical Python | — |
| 2 | (c) 1 | a flat list gives a 1-D array |
| 3 | (d) (2, 5) | 2 rows, 5 columns |
| 4 | (c) 20 | size = 4 × 5 |
| 5 | (a) string (Unicode text) | one string makes every item a string |
| 6 | (d) 7 | 6, 12, 18, 24, 30, 36, 42 (stops before 44) |
| 7 | (d) 24 | 6 elements × 4 bytes (int32 is 4 bytes) |
| 8 | (a) [42 75 51] | arithmetic on an array works on every element; a list would repeat instead |
| 9 | A list may hold items of different types; an array holds one type. Arrays support element-wise arithmetic and use less memory; lists do not. | — |
| 10 | (a) [5, 8, 6, 5, 8, 6, 5, 8, 6]; (b) [15 24 18] | a list repeats; an array multiplies each element |
| 11 | 7, 12, 17, 22, 27 | start at 7, add 5, stop before 29 |
| 12 | (a) 2; (b) 3; (c) 2; (d) 6 | shape (3, 2) |
| 13 | 56, 43, 50, 73 | element by element: 24 + 32, 13 + 30, 17 + 33, 45 + 28 |
| 14 | (a) float; (b) int | a string beats a float, and a float beats an int; dtype=float forces floats |
| 15 | (a) 30; (b) 4; (c) 120 | int32 = 32 bits = 4 bytes; 30 × 4 |
| 16 | (a) 0; (b) 12; (c) 13 | 0 to 12 |
| 17 | ndim = 2 (dimensions); shape = (2, 3) (rows, columns); size = 6 (elements); dtype = an integer type (int32 or int64, depending on the system); itemsize = bytes per element (4 for int32, 8 for int64). | — |
| 18 | (a) 2; (b) 9; (c) 8; (d) 72 | shape (3, 3); float64 = 8 bytes; 9 × 8 |
| 19 | (a) [84 21 61]; (b) [54 20 58]; (c) [30 1 3] | each operation works element by element |
| 20 | (a) 4; (b) 1,320; (c) 2,640; (d) 1,320 | 330 × 4; 330 × 8; difference |