Convert Fahrenheit to Celsius using Python

Calculate by formula

def fahrenheitToCelsius(fahrenheit):
    return (fahrenheit - 32) / 1.8


fahrenheit = 77.9
celsius = fahrenheitToCelsius(fahrenheit)

print(celsius)

Leave a Comment

Cancel reply

Your email address will not be published.