Question

Write a Python function to compute the distance from a point (xO,yo) to a line that goes through the two points(x1,y1) and (x2,y2). Hint: see the articlehttps://en.wikipedia.org/wiki/Distance_from_a_point_ to_a_line. Use the

function to compute the 100 distances from the line that connects (0,0) and(20,200) to the 100 points (x,y), where x and y are the arrays you computed for the previous question. What is the?sum of these distances Enter "x=[0,1,2,3,4,5,6];s=str(idnum);y3D[0,5.8,10.3,(float(s)-2e8)/1e5,float(s[O]+s[4:])/1e4,30+float(s[-1]),43.2]" in the Spyder Console. Given these seven(x,y)-points, what is the slope of agression line through the origin that?predicts y-values from the x-values

Question image 1Question image 2