assignment complete

I have written the two functions required for the assignment 2