code and plots for 1-4

assigment 1