Completed ex11.py