मराठी

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 - Computer Science (Python)

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.0
shaalaa.com
Operators - Arithmetic Operators (-,+,*,/,%)
  या प्रश्नात किंवा उत्तरात काही त्रुटी आहे का?
पाठ 5: Getting Started with Python - Exercise [पृष्ठ ११७]

APPEARS IN

एनसीईआरटी Computer Science [English] Class 11
पाठ 5 Getting Started with Python
Exercise | Q 10. | पृष्ठ ११७
Share
Notifications

Englishहिंदीमराठी


      Forgot password?
Use app×