Problem 4 Coded and Tested

Works...