Update ex40.py