added ex4.py