Python @ DjangoSpin

PyPro # 21 Temperature Conversion: Celsius to Fahrenheit

Buffer this pageShare on FacebookPrint this pageTweet about this on TwitterShare on Google+Share on LinkedInShare on StumbleUpon
Reading Time: 1 minutes

Temperature Conversion: Celsius to Fahrenheit in Python - A simple Python program to convert Celsius temperature to Fahrenheit temperature.

Temperature Conversion: Celsius to Fahrenheit in Python

# 32 degree F = 0 degree C
# 212 degree F = 100 degree C
# F = 32 + 9/5 * C
# C = (F - 32) * (5/9)

c = float(input("Enter Celsius temperature: "))
f = 32 + ( (9/5) * c )

print("Equivalent Fahrenheit temperature:", f)
Try it here.

See also:


Buffer this pageShare on FacebookPrint this pageTweet about this on TwitterShare on Google+Share on LinkedInShare on StumbleUpon