07:31Python temperature conversion program 🌡️
From the creator
#python #practice #exercises unit = input("Is this temperature in Celsius or Fahrenheit (C/F): ") temp = float(input("Enter the temperature: ")) if unit == "C": temp = round((9 * temp) / 5 + 32, 1) print(f"The temperature in Fahrenheit is: {temp}°F") elif unit == "F": temp = round((temp - 32) * 5 / 9, 1) print(f"The temperature in Celsius is: {temp}°C") else: print(f"{unit} is an invalid unit of measurement")
Published 2022-10-13 · Watch on YouTube ↗
Availability and playback restrictions are controlled by the original channel.





