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!
Tuples and Dictionaries · AW-11CS-TDC-2026-V1 · For parents — fold back or tear off before handing the sheet to your child.
| Q | Answer | Working |
|---|---|---|
| 1 | (d) an ordered sequence that cannot be changed after it is made | — |
| 2 | (d) (36, 27) | a slice of a tuple is a tuple; a one-item tuple prints with a comma |
| 3 | (b) (52, 52) | * repeats the tuple |
| 4 | (c) it stops with a ValueError: there are 3 values but only 2 names | the number of names must equal the number of values |
| 5 | (a) it stops with a KeyError, because 'mango' is not a key | use get() to avoid the error |
| 6 | (d) {'peach': 78, 'melon': 33, 'apple': 93, 'plum': 94} | update() changes an existing key in place and adds a new one at the end |
| 7 | (a) 3 False | del removes the key and its value |
| 8 | (a) 2 4 | each letter is a key; 't' appears 2 times and there are 4 different letters |
| 9 | A list is mutable and written in [ ]; a tuple is immutable and written in ( ); tuples can be dictionary keys and are a little faster. | — |
| 10 | (a) (26, 17, 42, 37); (b) 6 | + joins tuples into a new tuple; * repeats |
| 11 | {'pear': 80, 'lemon': 68, 'plum': 89} | a new key goes at the end; changing a value keeps its place |
| 12 | (a) 70; (b) 7 | 'lemon' is a key; 'guava' is not, so the default 7 is given |
| 13 | (a) 2; (b) 3; (c) 3 | counts: b 1, a 3, n 2 |
| 14 | (a) 143000; (b) 2 | 41000 + 24000 + 43000 + 15000 + 20000; salaries above 25000 |
| 15 | (a) 56; (b) 1; (c) (15, 19, 62) | t[2] is a one-item tuple; + joins tuples |
| 16 | dict_items([('history', 47), ('english', 79), ('music', 42)]) | items() gives (key, value) tuples in a dict_items view |
| 17 | sal = {'Asha': 30000, …}; for name in sal: if sal[name] > limit: print(name). | — |
| 18 | (a) 3; (b) 233; (c) 49; (d) ['art', 'history', 'music'] | each line uses the dictionary as the lines before left it |
| 19 | Rahul, Ananya, Kabir, Vikram | marks above 75: Rahul 87, Ananya 88, Kabir 94, Vikram 82 |
| 20 | (a) 20 95; (b) 59.285714285714285; (c) 2 2 | 95 appears twice; index() gives the first position |