The exercise I did in the book "Learn to Program"