Back
Look at the below code:
celsius = float(input("Enter temperature in celsius: "))fahrenheit = (celsius * 9/5) + 32print('%.2f Celsius is: %0.2f Fahrenheit' %(celsius, fahrenheit))
celsius = float(input("Enter temperature in celsius: "))
fahrenheit = (celsius * 9/5) + 32
print('%.2f Celsius is: %0.2f Fahrenheit' %(celsius, fahrenheit))
Also, try the following code:
# NameName = raw_input("Enter name= ")# Enter fDegree valueF = input("enter Fah Degree value= ")# Calculation for cDegreeC = (5.00/9.00)*(F-32.00)`#formula`print "The input Fdegress= {:.2f}".format(F)print "Celsius Degree = {:.2f}".format(C)
# Name
Name = raw_input("Enter name= ")
# Enter fDegree value
F = input("enter Fah Degree value= ")
# Calculation for cDegree
C = (5.00/9.00)*(F-32.00)`#formula`
print "The input Fdegress= {:.2f}".format(F)
print "Celsius Degree = {:.2f}".format(C)
Interested to learn the concepts of Python in detail? Come and join the python course to gain more knowledge in Python
31k questions
32.8k answers
501 comments
693 users