hw5.py