Write a Python program to convert Celsius to Fahrenheit

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
Share your love
Subhankar Rakshit
Subhankar Rakshit

Hey there! I’m Subhankar Rakshit, the brains behind PySeek. I’m a Post Graduate in Computer Science. PySeek is where I channel my love for Python programming and share it with the world through engaging and informative blogs.

Articles: 194