Practice · 1 of 3
Annotated Average
CHALLENGE
Difficulty: intermediate+25 XP
Implement average(values: list[float]) -> float that raises ValueError on an empty list. The annotations must be exactly list[float] and float (verifyable via typing.get_type_hints).
Press Submit to check your solution.
Back to lesson: Practice: Annotation Drills