Tip: Choose Save as PDF in the print dialog to download. Use A4 paper size.
Shade in the A or B circle for each question.
Draw a line connecting each item on the left to its match on the right.
| Left column | Right column | |
|---|---|---|
| 1t.append(4) | AOutput: (1, 2, 1, 2) | |
| 2t.remove(1) | BError: Tuples are immutable — no remove method | |
| 3(1, 2) + (3, 4) | CError: Tuples have no append method | |
| 4t.count(2) | DOutput: [1, 2, 3] | |
| 5(1, 2) * 2 | EOk: Count how many times 2 appears in t | |
| 6sorted((3, 1, 2)) | FValid: Concatenate two tuples into one |
Complete each line of code by filling in the missing parts.
Shade in the letter of the line that contains an error.
Concatenation (+) — Combines two tuples into a new tuple.~~Repetition (*)t = (1, 2) + (3, 4)t = (1, 2) * 3t = (1, 2, 2, 3)
print(t.count(2))t = (10, 20, 30)
print(t.index(20))t = (3, 1, 2)
print(sorted(t))