Google News
logo
Python Program to Convert Celsius To Fahrenheit
In the following example of Python program to convert Celsius to Fahrenheit :
Program :
celsius = float(input("Enter temperature in Celsius: "))
fahrenheit = (celsius * 9/5) + 32
print("Temperature in Fahrenheit:", fahrenheit)
Output :
Enter temperature in Celsius: 24
Temperature in Fahrenheit: 75.2
In this program, the user is prompted to enter the temperature in Celsius. The input is then converted to a float value and stored in the `celsius` variable.

The formula to convert Celsius to Fahrenheit is `(celsius * 9/5) + 32`. This is then calculated and stored in the `fahrenheit` variable.

Finally, the converted temperature in Fahrenheit is printed to the console using the `print()` function.