Completed ex19.py