Your question is Distance Between Two Points. Start with the requirements on the right.
Run and submit as often as you like. When you're ready, talk me through your approach or go straight to the code.
GM vehicle localization systems represent two positions on a two-dimensional coordinate plane. Given the coordinates of two points, calculate the straight-line Euclidean distance between them.
Implement the function distance_between_points, which receives four numeric coordinates and returns the distance as a floating-point number.
x1, y1, x2, and y2, representing points (x1, y1) and (x2, y2).sqrt((x2 - x1)^2 + (y2 - y1)^2).def distance_between_points(x1, y1, x2, y2):