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 | |
|---|---|---|
| 1a, b, c = (1, 2) | AOutput: 1 | |
| 2t[0] = 99 | BOutput: 8 | |
| 3a, b = b, a | CError: Not enough values to unpack | |
| 4return x, y | DError: Cannot modify tuple items | |
| 5(3, 1, 4).index(1) | EOk: Return multiple values as a tuple | |
| 6max((2, 8, 5)) | FValid: Swap two values with tuple unpacking |
Complete each line of code by filling in the missing parts.
Shade in the letter of the line that contains an error.
return a, b — Returns multiple values from a function as a tuple.~~a, b = b, adef min_max(nums):
return min(nums), max(nums)a, b = b, a # swapgrid = {}
grid[(0,0)] = 'start'first, *rest = (1, 2, 3, 4)_, value = ('key', 42)