Completed functions for assignment

Created these two functions for R Programming peer assessment
assignment.