added ex29.py, ex30.py, ex31.py