Final Answer Functions

Revised the .R file to include my versions of the functions that are
consistent with the assignment’s requirements