Solve the first 12 exercises for HW04.