Homework 5 Complete Code