ex32.py with extra credit