added ex3.py