Update DMS-HW8.py

Finished up homework 8.