This is my code for the assignment