# Python Programming - Write a program to convert Fahrenheit to Celsius. [ Formula : Celsius = (Fahrenheit – 32) * 5/9 ]

Steps:

- Create a file with .py extension. - Write solution of given problem and save - Run to get the Output

Solution/code: temperature.py file

fahrenheit = float(input("Enter temperature in fahrenheit : ")) celsius = (fahrenheit -32)* 5/9 print('Entered Fahrenheit is:' ,fahrenheit) print('Fahrenheit to Celsius is:' ,celsius)

Output

Enter temperature in fahrenheit : 93.2 Entered Fahrenheit is: 93.2 Fahrenheit to Celsius is: 34.0

Explanation:

- print() : used to print a python objects(string, list, tuple, etc.). - Syntax: print(object(s), sep, end, file, flush) - Celsius to Fahrenheit Formula :- Celsius = (Fahrenheit – 32) * 5/9 - Fahrenheit to celsius :- Fahrenheit = (Celsius * 9/5) + 32 - To convert the input to int or float we have to use the int() and float() method

# type your code Here print ("Hello Python Learner")

Proverbs 8:33
Hear instruction, and be wise, and refuse it not.