def Fah():
    F=int(input(‘Enter the temperature on Fahrenheit(F)’))
    C=(F – 32) * 5/9
    K=(F – 32) * 5/9 + 273.15
    print(“Fahrenheit Value :”,F)
    print(“Celsius Value :”,C)
    print(“Kelvin Value:”,K)

def Cel():
    C=int(input(‘Enter the temperature on Celsius(C)’))
    F=(C * 9/5) + 32
    K=C + 273.15
    print(“Fahrenheit Value :”,F)
    print(“Celsius Value :”,C)
    print(“Kelvin Value:”,K)

def Kel():
    K=int(input(‘Enter the temperature on Kelvin(K)’))
    F=(K – 273.15) * 9/5 + 32
    C=K – 273.15
    print(“Fahrenheit Value :”,F)
    print(“Celsius Value :”,C)
    print(“Kelvin Value:”,K)
print(“n”)
print(‘1.Fahrenheit to Celsius & Kelvinn2.Celsius to Fahrenheit & Kelvinn3.Kelvin to Fahrenheit & Celsiusn4.Exit’)
n=int(input(‘Enter the choice:’))
if n==1:
      Fah()      
elif n==2:
      Cel()   
elif n==3:
      Kel()      
elif n==4:
      exit()
else:
      print(‘Invalid options’)

Source link

Temperature Conversion Table

Leave a Reply

Your email address will not be published. Required fields are marked *