Over the course of 7 days, the average gas price across Massachusetts fluctuates; these prices are given in the gas_prices variable. Plot the prices with a line graph in matplotlib. The x-axis, day, ranges from 1 to 7.
gas_prices = [4.80, 5.05, 4.90, 5.10, 5.20, 5.15, 5.30]
Plot the same graph again but with an additional trendline in red of y = x/12 + 4.75, plotted as a line graph on top of the original points, which should now be a scatter plot. (Hint: You just need two points on the line to plot the line.)
On a new graph, plot the function y = 10e^x from 0 to 5. Use np.linspace(0, 5) to get at least 100 samples, then plot it as a line graph. Note that you can call 10 * numpy.exp(v) on a vector v to get all the y values, but you could instead calculate the y values in a loop if that feels more comfortable.
Problem 3: Matrices (10 points)
Find the product AB, where A is a 2x100 matrix with all ones in the first row and all zeros in the second row, and B is a 100x2 matrix of all 1's. Use np.concatenate, np.zeros, and np.ones to create the matrix A, and np.ones to create matrix B. (Recall an m x n matrix has m rows and n columns.)