Using the starter code that includes two functions that convert between metric and imperial values for distance (inches <-> centimeters) and weight (pounds <-> kilograms), your job is to test these functions. You should write a main() in test_measurements.py; when we run it, we should see all of your tests, the expected result for each one, and the actual result for each one.
this is an old reference guide question found on the internet
Using the starter code that includes two functions that convert between metric and imperial values for distance (inches <-> centimeters) and weight (pounds <-> kilograms), your job is to test these functions. You should write a main() in test_measurements.py; when we run it, we should see all of your tests, the expected result for each one, and the actual result for each one.
*** Testing inches -> cm conversions
Converting 0 inches to centimeters:
>>result = 0.00 expected = 0.00
Converting 1 inches to centimeters:
>> result = 2.53 expected =2.54
*** testing cm-> inches conversions
Converting 0 centimeters to inches:
>> result = 0.00 expected = 0.00
Converting 38 centimeters to inches:
>> result = 14.96 expected = 14.96
PYTHON STARTING CODE
Step by step
Solved in 2 steps