This Python code shows you how to convert Celsius temperatures to Kelvin.
Of course, you are free to make it better. All you really need is the formula.
Code listing to convert Celsius to Kelvin in Python
Below is the code listing for this program.
# ---------------------------------------------
# celsius_to_kelvin.py
# Designed and programmed by Alex Shaw III
# Date created: January 4, 2023
# Last modified: January 4, 2023
#
# This program converts Celsius to Kelvin
# ---------------------------------------------
celTemp = input('Enter a Celsius temperature: ')
kelTemp = float(celTemp) + 273.15
print(str(celTemp) + ' degrees Celsius is ' +
str(kelTemp) + ' Kelvin.')
Output
Here is the output for the above program.

Developer’s note
We did not put any comments for the code in this program. We think you got it.
If you have any questions or comments, then send us an email at support@techronology.com.
Related
- Convert Celsius to Fahrenheit in Python
- Convert Fahrenheit to Celsius in Python
- Convert temperatures in Python
Python page
Click on the button below to go to our Python page.

Python is a high-level computer programming language. If you want more information on Python, then visit Python Software Foundation.