Added code for assignment 1.