Search
Search the internet and find the conversion equations between the Celsius and Fahrenheit temperature scales.
Create module temperature.py with 2 functions:
temperature.py
celsius_to_fahrenheit(degrees_celsius)
fahrenheit_to_celsius(degrees_fahrenheit)
Specifications:
celsius_to_fahrenheit
doctest
# file average.py def average(x,y): """Return the average of 2 numbers. >>> average(10,20) 15.0 >>> average(1.5, 2.0) 1.75 """ return (x + y) / 2 if __name__ == "__main__": import doctest doctest.testmod(verbose=True)
unittest
testing.py
test_temperature.py
Still in module temperature.py, create a function convert which shall
convert
C
F