Python Program to Convert Celsius To Fahrenheit

Given the temperature in degree Celsius. the task is to convert the value in the Fahrenheit scale and display it.

Examples :

Input :
37 
Output :
37.00 Celsius is: 98.60 Fahrenheit

Input :
40
Output :
40.00 Celsius is equivalent to: 104.00 Fahrenheit

Approach:
Take Celsius temperature as input from the user, apply the conversion formula of Fahrenheit from Celsius, and display it. The relationship between the Celsius scale and the Fahrenheit scale is given by :
 
 fahrenheit = (celsius*1.8) + 32
 
Below is the implementation.

filter_none

edit
close

play_arrow

link
brightness_4
code

# Temprature in celsius degree
celsius = 40
  
# Converting the temprature to 
# fehrenheit using the above
# mentioned formula
fahrenheit = (celsius * 1.8) + 32
  
# printing the result
print('%.2f Celsius is equivalent to: %.2f Fahrenheit'
      %(celsius, fahrenheit))

chevron_right


Output:

40.00 Celsius is equivalent to: 104.00 Fahrenheit
My Personal Notes arrow_drop_up

Check out this Author's contributed articles.

If you like GeeksforGeeks and would like to contribute, you can also write an article using contribute.geeksforgeeks.org or mail your article to contribute@geeksforgeeks.org. See your article appearing on the GeeksforGeeks main page and help other Geeks.

Please Improve this article if you find anything incorrect by clicking on the "Improve Article" button below.


Article Tags :

Be the First to upvote.


Please write to us at contribute@geeksforgeeks.org to report any issue with the above content.