problem_5.py : Completed