Solves Problem 10 in Python