Temperature conversion

This is a python program to convert temperature from CelsiusĀ  to Fahrenheit .

print("Temperature conversion")
print("1.celcius to fehrenheit",
      "2.fehrenheit to celcius")

choice=int(input("Enter your choice"))
if choice==1:
    c=int(input("Enter temperature in celcius"))
    f=(9*c)/5+32
    print(f"temperature in fehrenheit is {f}")
else:
    f = int(input("Enter temperature in fehrenheit"))
    c = ((f-32)*5)/9
    print(f"temperature in celcius  is {f}")

 

Leave a Comment

%d bloggers like this:
Python4U
Privacy Overview

This website uses cookies so that we can provide you with the best user experience possible. Cookie information is stored in your browser and performs functions such as recognising you when you return to our website and helping our team to understand which sections of the website you find most interesting and useful.