Spaces:
Running
on
Zero
Running
on
Zero
File size: 587 Bytes
0f43f8a |
1 2 3 4 5 6 |
Create a Python program that consists of a single class named 'TemperatureConverter' in a file named 'temperature_converter.py'. The class should have the following methods: - celsius_to_fahrenheit(self, celsius: float) -> float: Converts Celsius temperature to Fahrenheit. - fahrenheit_to_celsius(self, fahrenheit: float) -> float: Converts Fahrenheit temperature to Celsius. Create a separate 'main.py' file that imports the 'TemperatureConverter' class, takes user input for the temperature value and the unit, converts the temperature to the other unit, and then prints the result. |