► Python Program to Convert Celsius To Fahrenheit


Steps followed:
1. Take temperature input from user in Celsius
2. use below formula to convert Celsius To Fahrenheit
   Temp in Fahrenheit = (Temp in Celsius * 9/5) + 32
3. print the result


Program

#Python Program to Convert Celsius To Fahrenheit

# Take temperature input from user in Celsius
temp_in_celsius = float(input("provide temperature input in Celsius: "))

# convert Celsius To Fahrenheit
temp_in_fahrenheit = (temp_in_celsius * 9/5) + 32

#printing the result
print('%0.2f degree celsius is equal to %0.2f degree fahrenheit' %(temp_in_celsius,temp_in_fahrenheit))


Output

provide temperature input in Celsius: 40
40.00 degree celsius is equal to 104.00 degree fahrenheit

 

provide temperature input in Celsius: 30
30.00 degree celsius is equal to 86.00 degree fahrenheit

 

provide temperature input in Celsius: 0
0.00 degree celsius is equal to 32.00 degree fahrenheit





Also Read: