Completed ex14.py