Completed the assignment 3,4,6

Completed the assignment 3,4,6
function name should be relevant