Solved problem 8 with Python