Problem 1 Solution (Python)

Simple answer to problem 1 in python.