Programming Assignment 2

This is my code for programming assignment 2 for coursera.