Skip to main content

Practice · 1 of 2

Validated Temperature

CHALLENGE
Difficulty: intermediate+25 XP

Create a class Temperature with a celsius property. The setter must raise ValueError for values below -273.15 (absolute zero). Reading celsius returns the stored value.

Back to lesson: Practice: Property Drills