Scientific Computing Using Python - PHYS:4905
Python Homework #2
Due 9/3/2019


Name _______________________________________________

1. (5) Write Python code to make an array with values from 0 to 350 with a step of 10, make a second array with the cosine of those values taken to be angles in degrees, and then calculate the average of the cosines and the standard deviation of the cosines.  Hand in both your code and your results for average and standard deviation.


2. (1) Write Python code to produce a 4×4 matrix that has the values 1, 2, 3, 4 along the diagonal and is zero everywhere else.