Python: How to convert temperature from Fahrenheit to Celsius .

Program 7. Write a python program to input temperature in degree Fahrenheit and convert it to degree centigrade. How to convert temperature from Fahrenheit to Celsius in python programming. Python program for temperature conversion. Logic to convert temperature from Fahrenheit to Celsius in python program.

For Example
Input
Temperature in fahrenheit = 205
Output
Temperature in celsius = 96.11 C
Temperature conversion formula
Formula to convert temperature from degree fahrenheit to degree celsius is given
by –
celsius = (fahrenheit – 32) * 5 / 9

Logic to convert temperature from fahrenheit to celsius
Step by step descriptive logic to convert temperature from degree fahrenheit to
degree celsius –
1. Read temperature in fahrenheit in some variable say fahrenheit.
2. Apply the temperature conversion formula celsius = (fahrenheit – 32) * 5 / 9.
3. Print the value of celsius.

#Let us now code the solution:
print(“\n\t\t\thttps://learnpythonforcbse.wordpress.com/”)
#Reads temperature in fahrenheit
print(“\nEnter temperature in Fahrenheit: “)
fahrenheit=float(input())

#Fahrenheit to celsius conversion formula
celsius = (fahrenheit – 32) * 5 / 9;

#Print the result
print(“Fahrenheit = “, fahrenheit, “To Celsius = “,celsius);
print(“\n\t\t\t https://learnpythonforcbse.wordpress.com/”)

OUTPUT:

prog7