Programming Assingment Completed by writing 2 functions