Skip to content
Related Articles

Related Articles

Python Program to Convert Celsius To Fahrenheit

View Discussion
Improve Article
Save Article
  • Difficulty Level : Basic
  • Last Updated : 13 Jul, 2022

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

Input :
Output :
37.00 Celsius is: 98.60 Fahrenheit

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

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.


# Temperature in celsius degree
celsius = 40
# Converting the temperature 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))


40.00 Celsius is equivalent to: 104.00 Fahrenheit

Time Complexity: O(1)

Auxiliary Space: O(1)

My Personal Notes arrow_drop_up
Recommended Articles
Page :

Start Your Coding Journey Now!