Solve exercises for chapter #3

All tests passing :) Thanks for this amazing book!