Function R Programming Assignment 1 for R Programming Course