Writing the assignment

Writing the code for the assignment