Solved Problem 2 in standard Python