Python Program to Convert Celsius To Fahrenheit – 2023

Hey guys, in this blog we will see a Python Program to Convert Celsius To Fahrenheit.

We will use the following formula to convert Celcius to Fahrenheit.

F = 9/5*C + 32

Code

# Python Program to Convert Celsius To Fahrenheit

celsius = input('Enter the temperature in Celcius -> ')

fahrenheit = (9*float(celsius))/5 +32

print(f'{celsius}C = {fahrenheit}F')

Output

Enter the temperature in Celcius -> 5
5C = 41.0F
Enter the temperature in Celcius -> 10
10C = 50.0F
Enter the temperature in Celcius -> 45
45C = 113.0F
  • Taking the input from the user.
  • Converting it to float.
  • Applying the formula for converting Celcius to Fahrenheit.

Check out our other python programming examples

Abhishek Sharma
Abhishek Sharma

Started my Data Science journey in my 2nd year of college and since then continuously into it because of the magical powers of ML and continuously doing projects in almost every domain of AI like ML, DL, CV, NLP.

Articles: 521

Leave a Reply

Your email address will not be published. Required fields are marked *