Tuesday, October 3, 2023
HomeProgrammingPythonPython 3 Program To Convert Celsius To Fahrenheit

# Python 3 Program To Convert Celsius To Fahrenheit

This post was last Updated on June 8, 2023 by Himanshu Tyagi to reflect the accuracy and up-to-date information on the page.

In this tutorial, you will learn a simple Python 3 program to convert Celsius to Fahrenheit and Fahrenheit to Celsius. Before moving ahead, make sure you know about Python programming basics.

## Python 3 Program To Convert Celsius To Fahrenheit

To convert Celsius to Fahrenheit, we will use this formula: Fahrenheit = (celsius * 1.8) + 32.

Source Code:

```celsius = float(input("Enter temperature in celsius: "))
fahrenheit = (celsius * 1.8) + 32
print('%0.1f celsius = %0.1f Fahrenheit' % (celsius, fahrenheit))```

## Python 3 Program To Convert Fahrenheit to Celsius

To convert Fahrenheit to Celsius, we will use this formula: Celsius = (Fahrenheit – 32) / 1.8

```fahrenheit = float(input("Enter temperature in Fahrenheit: "))
celsius = (fahrenheit - 32) / 1.8
print('%0.1f Fahrenheit = %0.1f Celsius' % (fahrenheit, celsius))```

## Output

### Other Python Programs:

Himanshu Tyagi
Hello Friends! I am Himanshu, a hobbyist programmer, tech enthusiast, and digital content creator. Founder Cool SaaS Hunter. With CodeItBro, my mission is to promote coding and help people from non-tech backgrounds to learn this modern-age skill!
RELATED ARTICLES