Advertisements
Advertisements
प्रश्न
Write a Python program to convert temperature in degrees Celsius to degrees Fahrenheit. If the water boils at 100 degrees C and freezes at 0 degrees C, use the program to find out what is the boiling point and freezing point of water on the Fahrenheit scale. (Hint: T(°F) = T(°C) × 9/5 + 32)
थोडक्यात उत्तर
Advertisements
उत्तर
Program:
#defining the boiling and freezing temp in Celcius
boil = 100
freeze = 0
print('Water Boiling temperature in Fahrenheit::')
#Calculating Boiling temperature in Fahrenheit
tb = boil * (9/5) + 32
#Printing the temperature
print(tb)
print('Water Freezing temperature in Fahrenheit::')
#Calculating Boiling temperature in Fahrenheit
tf = freeze * (9/5) + 32
#Printing the temperature
print(tf)
OUTPUT:
Water Boiling temperature in Fahrenheit::
212.0
Water Freezing temperature in Fahrenheit::
32.0shaalaa.com
Operators - Arithmetic Operators (-,+,*,/,%)
या प्रश्नात किंवा उत्तरात काही त्रुटी आहे का?
