edited ex7.py adding explanation