exercise 5_2.py