Python temperature conversion program 🌡️

Published: 13 October 2022
on channel: Bro Code
59,009
1.1k

#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")


On this page of the site you can watch the video online Python temperature conversion program 🌡️ with a duration of hours minute second in good quality, which was uploaded by the user Bro Code 13 October 2022, share the link with friends and acquaintances, this video has already been watched 59,009 times on youtube and it was liked by 1.1 thousand viewers. Enjoy your viewing!