Construct with Celsius and read Fahrenheit
Input
Temperature(celsius=100).fahrenheit
Output
212.0
100°C is 212°F.
Full lesson preview
Use property getters/setters to keep related attributes consistent (Celsius ↔ Fahrenheit) with validation.
Problem statement
Task
Examples
Input
Temperature(celsius=100).fahrenheit
Output
212.0
100°C is 212°F.
Input format
Output format
Constraints
Samples
Input
Temperature(fahrenheit=32).celsius
Output
0.0
32°F equals 0°C; the property getter converts correctly.