''' This exercise contains a number of simple things to try to get familiar with NumPy. Hint: Functions (probably) exist for most of these. Use the NumPy documentation at numpy.org - try not to be too intimidated, it's easier than it seems. Google is also your friend. ''' import numpy as np ''' Exercise A Define `x_ar` so that it is an array of 124 elements ranging from 2.3 to 1776.343, evenly spaced on a logarithmic scale. Hint: There is a function to do this. ''' x_ar = # Your code here ''' Exercise B Reshape `x_ar` to 2-dimensional array (pick the lengths you'd like). ''' # Your code here ''' Exercise C Add 10 to every value in the array. Hint: you don't need any loops to do so. ''' # Your code here ''' Exercise D Reshape `x_ar` to a 1-dimensional array again. Define a new array `y_ar` as a linear space of 10 values from 23.4 to 1006.2 and add it to the end of `x_ar`. ''' # Your code here ''' Exercise E Print every 10th value from the new combined `x_ar`. You should be able to do this without loops. ''' # Your code here ''' Exercise F Test out this code. Try to describe what you see and understand what is going on before running it). ''' test_ar = np.linspace(1, 50) mask_ar = test_ar >= 25 new_ar = test_ar[mask_ar] print(new_ar) ''' Exercise G Now find the average for every value above 100 in the combined `x_ar`. You should be able to do this without loops. ''' # Your code here