completed ex_35.py