Assignment 2

Defined the functions for Assignment 2