update ex7.py