Problem: Write a Python program to convert Celsius to Fahrenheit.
Formula to Convert Celsius to Fahrenheit
The conversion formula is:
Fahrenheit=(Celsius×9/5)+32
Here, 0°C is equal to 32°F, and each Celsius degree increases by 1.8 Fahrenheit.
Python Program to Convert Celsius to Fahrenheit
# Taking user input celsius = float(input("Enter temperature in Celsius: ")) # Converting Celsius to Fahrenheit fahrenheit = (celsius * 9/5) + 32 # Displaying the result print(f"{celsius}°C is equal to {fahrenheit:.2f}°F")
Output
Enter temperature in Celsius: 17.4 17.4°C is equal to 63.32°F