Day2 HW Q3 code and plot