Python Program to Convert Celsius To Fahrenheit

406
Celsius To Fahrenheit

In this program, you’ll learn how to Convert Celsius To Fahrenheit in Python.

To properly understand this how to get Celsius To Fahrenheit, you should have the knowledge of following Python programming topics:

  1. Python Input, Output and Import
  2. Python Variables and Data Types
  3. Python Operators

NOTE:celsius * 1.8 = fahrenheit - 32

Program to Convert 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

The above code can be converted into Faherenite to Celsius using the following formula

celsius = (fahrenheit - 32) / 1.8

Program to Convert Celsius To Fahrenheit in Python
Program to Convert Celsius To Fahrenheit in Python

Related Programs

  1. Python Program to find the area of Triangle.
  2. Python Program to Solve Quadratic Equation.
  3. Python Program to Generate a Random Number.
  4. Python Program to Generate a Random alphanumeric String.
  5. Python Program to find the Square Roots
  6. Python Program to Shuffle Deck of Cards
  7. Python program convert decimal number to binary number using recursion
  8. Python Program to Find Factorial of a Number Using Recursion
  9. Python Program to Check if a Number is Positive, Negative or 0
  10. Python Program to Display Fibonacci Sequence Using Recursion

Ask your questions and clarify your/other doubts on by commenting. Python Documentation