first submission for programming assignment 2 of R Programming by teddychowpt