Adding the soltuion of the ex7 of chapter1