Update DMS-HW7.py

Added Challenge 3 to HW7.py for EXE. 8 and also added a doctest.