In this program, you’ll learn to convert Celsuis to Fahrenheit and display it.
To understand this example, you should have the knowledge of the following Python programming topics:
In the program below, we take a temperature in degree Celsius and convert it into degree Fahrenheit. They are related by the formula:
celsius * 1.8 = fahrenheit - 32
Source Code
# 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
Related posts:
Python Program to Find the Largest Among Three Numbers
Python Machine Learning Third Edition - Sebastian Raschka & Vahid Mirjalili
Python Program to Convert Decimal to Binary Using Recursion
Python RegEx
Python Program to Differentiate Between type() and isinstance()
Python sleep()
Python String zfill()
Python Dictionary setdefault()
Python Set pop()
Python Dictionary clear()
Python Program to Find the Square Root
Python break and continue
Python Dictionary values()
Python Program to Find the Factors of a Number
Python Errors and Built-in Exceptions
Python Program to Copy a File
Python type()
Python Program to Check if a Key is Already Present in a Dictionary
Python List extend()
Python Program to Find the Size (Resolution) of a Image
Python Package
Deep Learning with Python - Francois Cholletf
Python tuple()
Python Set symmetric_difference()
Python Program to Illustrate Different Set Operations
Python Dictionary get()
Python Set symmetric_difference_update()
Python Program to Display Fibonacci Sequence Using Recursion
Python Tuple count()
Python String isupper()
Python Program to Check if a Number is Positive, Negative or 0
Python list()