new file:   ex40.py