Temperature class
Created on April 1, 2020 by Julien Palard
Write a class to convert from Fahrenheit, Celsius, and Kelvins.
You'll have to use descriptors, so read the doc first.
The class should be named Temperature
, it represents a temperature, in any scale
(I only ask for Fahrenheit, Celsius, and Kelvins, but you can add more as needed.)
It should work like this:
1 2 3 4 5 6 |
|
Your class should accept a modification of the current temperature from any of the three attributes, and should give proper values when accessed by any of the three attributes:
1 2 3 4 5 6 7 8 9 10 |
|
You'll find conversions in the Wikipedia.