ex31.py