Solution to problem 010.py