Convert Fahrenheit to Celsius

Theory:

The formula to convert temperature from Fahrenheit to Celsius is: Celsius = (Fahrenheit - 32) * 5/9.

Python Code:

def fahrenheit_to_celsius(fahrenheit):
    celsius = (fahrenheit - 32) * 5/9
    return celsius

fahrenheit = float(input("Enter temperature in Fahrenheit: "))
celsius = fahrenheit_to_celsius(fahrenheit)
print("Temperature in Celsius:", celsius)

Output 1:

Enter temperature in Fahrenheit: 32

Temperature in Celsius: 0.0

Output 2:

Enter temperature in Fahrenheit: 68

Temperature in Celsius: 20.0

Output 3:

Enter temperature in Fahrenheit: 100

Temperature in Celsius: 37.77777777777778