Skip to main content

4.11) Exercise 7 - Debugging (Harder)


Here is a program that is meant to convert 40.5 degrees Fahrenheit into degrees Celsius and then from degrees Celsius into Kelvin.

temperature_conversion_debugging.py

There are 5 bugs in the code, find them and correct them. The program should return:

40.5 deg F is
277.872222222 K and  4.72222222222 deg C

Check the results are identical and printed in the same way.

Temperature conversion equations: http://en.wikipedia.org/wiki/Temperature_conversion