Python Program to Convert Temperature in Celsius to Fahrenheit & Kelvin

This python program reads temperature in Celsius from user and converts it to Fahrenheit and Kelvin.

Following temperature conversion formula are used in this program:

Fahrenheit = 1.8 * Celsius + 32

Kelvin = 273.15 + Celsius

Python Source Code: Celsius to Fahrenheit & Kelvin


# Celsius to Fahrenheit & Kelvin

# Reading temperature in Celsius
celsius = float(input('Enter temperature in celsius: '))

# Converting
fahrenheit = 1.8 * celsius + 32
kelvin = 273.15 + celsius

# Displaying output
print('%0.3f Celsius = %0.3f Fahrenheit.' % (celsius, fahrenheit))
print('%0.3f Celsius = %0.3f Kelvin.' % (celsius, kelvin))

Temperature Conversion Output

Enter temperature in celsius: 47
47.000 Celsius = 116.600 Fahrenheit.
47.000 Celsius = 320.150 Kelvin.