This post shows how to convert a temperature from Celsius to Fahrenheit in Python, using the standard conversion formula.

Convert Celsius to Fahrenheit in Python:

Explanation:
The conversion formula is F = (C * 9/5) + 32. We take the Celsius value as input, apply the formula, and print the result in Fahrenheit.


Python Program to Convert Celsius to Fahrenheit

celsius = float(input("Enter temperature in Celsius: "))

fahrenheit = (celsius * 9 / 5) + 32

print(f"{celsius}°C is equal to {fahrenheit}°F")

Output:

Enter temperature in Celsius: 37
37.0°C is equal to 98.6°F

Simple formula-based conversions like this are common beginner exercises — browse more in our Interview Prep section.