The error you encountered in Exercise 1 - linear_function is likely related to how the random numbers are generated. Based on your code in the linear_function, you used np.random.rand() instead of np.random.randn(). The rand() function generates random numbers between 0 and 1, while randn() generates random numbers from a normal distribution (centered at 0 with a standard deviation of 1).