assignment: function

this is my functions homework assignment