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

Developer’s note
If you have any questions or comments, then send us an email at support@techronology.com.
Related
- Change Celsius to Kelvin in Python
- Change 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.