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: