problem_7.py : Completed