Modified for the assignment 2

This commit is for the assignment 2 of the course “Programming in R” as
hosted by Coursera.com