Expose calculated and validated attributes.

Prototype: implement Circle(radius) with a public mutable radius and a read-only diameter property returning 2 * radius. The radius is a nonnegative number; no validation is required in this stage.

Final: implement Temperature(celsius) with a read-write celsius property and read-only fahrenheit property computed as celsius * 9 / 5 + 32. Celsius values are finite integers or floats. Reject values below -273.15 with ValueError, both during construction and later assignment. A rejected assignment preserves the prior value. No type or NaN validation is required. Different instances are independent. Example: Temperature(0).fahrenheit -> 32.0. Use a property setter for the rule; a custom descriptor is optional extension material, not required.

Drag or use the arrow keys to resize. Home collapses the question; End collapses the editor. Enter or double-click resets the split.
Loading editor…
No results yet.

Complete the starter code, then run the checks.
Results and errors will appear here.