Solved assignment

my solved assignment 2 file, with clear comments on each line