Python 3 Program To Convert Celsius To Fahrenheit

1
8

python 3 program to convert Celsius To Fahrenheit

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 that you know about the basics of Python programming. If you are looking for some of the best books to learn Python, then check out these recommendations.

Also Check: Sending 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 Source Code.

Download Python File.

Other Python Programs:

  1. Python 3 Program To Find 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.