Answer ex4.24

Close #4