Python Program to Convert Celsius To Fahrenheit

 # 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

We encourage you to create a Python program to convert Fahrenheit to Celsius on your own using the following formula

celsius = (fahrenheit - 32) / 1.8

0 Comments