Solved exercises from 3.7 to 3.15