import numpy as np import matplotlib.pyplot as plt x_data = [338.,333.,328.,207.,226.,25.,179.,60.,208.,606.] y_data = [640.,633.,619.,393.,428.,27.,193.,66.,226.,1591.] #y_data = w*x_data + b x = np.arange(-200,-100,1)#bias y = np.arange(-5,5,0.1)#w…