ex33.py with extra credit