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 | |
|---|---|---|
| 1if status = Status.ACTIVE: | AError: Use for item in Status: to iterate | |
| 2for item in Status.members: | BError: Use == not = for comparison | |
| 3if status == Status.ACTIVE: | CValid: Compare enum members with == | |
| 4for item in Status: | DOutput: 1 | |
| 5min(3, 1, 4, 1, 5) | EOutput: 5 | |
| 6max(3, 1, 4, 1, 5) | FOk: Iterate through all enum members |
Complete each line of code by filling in the missing parts.
Shade in the letter of the line that contains an error.
Tuples — A tuple is an ordered, fixed-size collection of values. Conceptually, it acts like a single record or row (e.g., a person's name and age), where each specific position holds a distinct piece of related data.from enum import Enum, auto
class Color(Enum):
RED = auto()prices = {Size.SMALL: 5}
print(prices[Size.SMALL])if status == Status.ACTIVE:
print('Active')for item in Color:
print(item.name)class Size(Enum):
SMALL = auto()