Question : Python Program : To Convert Celsius To Fahrenheit
In the program below, we take a temperature in degree Celsius and convert it into degree Fahrenheit.
They are related by the formula, celsius * 1.8 = fahrenheit - 32
PROGRAM |
# Python Program to convert temperature in celsius to fahrenheit # change this value for a different result celsius = 37.5 # calculate fahrenheit fahrenheit = (celsius * 1.8) + 32 print('%0.1f degree Celsius is equal to %0.1f degree Fahrenheit' %(celsius,fahrenheit)) |
OUTPUT |
37.5 degree Celsius is equal to 99.5 degree Fahrenheit |
Thank you very much for reading carefully, if you have any other questions, you can share it with us through comments, if this information was important to you, please let us knows through comments.
Please do comment and share.
Thank You.
No comments:
Post a Comment