problem 9

fixed prob 9 in the python script