tubeshowcase●1,194,391 videos♡ My collection 0
← Learn to Code

Learn to Code03:59

Python temperature conversion program 🌡️

Bro Code ↗

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.

Keep exploring Learn to Code