Updates ps9.py with fix for bug in solution to Problem 2.