Solution for Exercise 64-2, script(1)