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.

Also CheckSending Emails Using Python With Image And PDF Attachments.

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))

Run The Program

Output

celsius to fahrenheit

Other Python Programs:

  1. Python 3 Program To Swap Two Numbers.
  2. Python  3 Program To Solve A Quadratic Equation.
  3. Python 3 Program to Calculate The Area of a Triangle.
  4. Python 3 Program To Add Two Numbers.
  5. Python 3 Program to Find the Square Root of A Number

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))

Run The Program

Output

Fahrenheit to Celsius

Download the Source Code.

Download Python File.

Other Python Programs:

  1. Python 3 Program To Find the Largest Element In An Array or List.
  2. Python 3 Program To Find The Sum of An Array.
  3. Python 3 Program to Convert Kilometres to Miles.
  4. Python 3 Program to Generate A Random Number.
  5. Python 3 Program To Add Two Matrices.
  6. Python 3 Program to Check Armstrong Number.
  7. Python 3 Program to Find the Sum of Natural Numbers.
  8. Python 3 Program To Find The Factorial Of A Number.
Himanshu Tyagi
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