Adding solutions of the problems 1-9 for Homework #4