Solution to Problem 7: