class TemperatureConverter: def __init__(self, temp): self.temp = temp def fahrenheit_to_celsius(self): return round((self.temp - 32) * 5/9, 2) def celsius_to_fahrenheit(self): return round((self.temp * (9/5)) + 32, 2)
- class TemperatureConverter:
- def __init__(self, temp):
- self.temp = temp
- def fahrenheit_to_celsius(self):
pass- return round((self.temp - 32) * 5/9, 2)
- def celsius_to_fahrenheit(self):
pass- return round((self.temp * (9/5)) + 32, 2)