【资料图】
本文目录导航:
1、最佳答案Sure, here"s a simple Python program that converts Fahrenheit to Celsius:```pythondef fahrenheit_to_celsius(fahrenheit): celsius = (fahrenheit - 32) * 5/9 return celsiusfahrenheit = float(input("Enter temperature in Fahrenheit: "))celsius = fahrenheit_to_celsius(fahrenheit)print("Temperature in Celsius:", celsius)```In this program, we define a function `fahrenheit_to_celsius` that takes a temperature in Fahrenheit as input and returns the equivalent temperature in Celsius. The formula to convert Fahrenheit to Celsius is `(F - 32) * 5/9`.We then prompt the user to enter a temperature in Fahrenheit, convert it to a float, and call the `fahrenheit_to_celsius` function to get the equivalent temperature in Celsius. Finally, we print the result.