Question: Create a custom Pythonmodule named tempconvert.py . This module mustcontain two functions: one that converts from Celsius toFahrenheit and one that converts from Fahrenheit toCelsius.
Create a custom Pythonmodule named tempconvert.py. This module mustcontain two functions: one that converts from Celsius toFahrenheit and one that converts from Fahrenheit toCelsius. Write a programnamed program53.py , which has a mainfunction, that imports the tempconvert module. The programshould prompt the user to specify the temperature and the scale,and then perform the appropriate conversion accurateto two decimal places.
SAMPLE OUTPUT 1
Enter the temperature to convert 37
Was that input Celsius or Fahrenheit?
Enter C or F C
In Fahrenheit, that is 98.60
SAMPLE OUTPUT2
Enter the temperature to convert -40
Was that input Celsius or Fahrenheit?
Enter C or F F
In Celsius, that is -40.00
Note:You will have two python files, progam53.py which has the main andthe print statements and tempconvert.py. which has the twofunctions. Use the import keyword to import tempconvert and tocall the functions, wouldbe tempconvert.functionname()
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
