To find the distance between two points x 1 y 1 and x 2 y 2 all that you need to do is use the coordinates of these ordered pairs and apply the formula pictured below. Distance can be calculated using the two points x 1 y 1 and x 2 y 2 the distance d between these points is given by the formula. The formula for computing the distance is 2 x 2 - x 12 y 2 - y 12.
The length of the hypotenuse is the distance between the two points.
Import math p1 4 0 p2 6 6 distance mathsqrt p10-p202p11-p212 printdistance Sample Output. Refer to the image for better understanding. See the answer 215 Geometry. The formula for distance between two point x1 y1 and x2 y2 is.