Solve exercise 6 from section 4.7.
This assignment is
Level 2.5
.