Completed ex10.py & ex11.py