problem_4.py : Completed