| CodeRams Practice Problem Archive |
|---|
| Finished |
Find the distance between two 2D points. Remember that the distance formula is
$$$d = \sqrt{(x_{2} - x_{1})^2 + (y_{2}-y_{1})^2}$$$
math.sqrt will calculate the square root of a number. Also, you also have to add the line import math at the top of the program.
The first two lines contain the X and Y coordinates of the first point respectively. The second two lines contain the X and Y coordinates of the second point respectively. Each coordinate will have an integer value between -1000 and 1000, inclusive.
A double N representing the distance between the two points
1 1 2 2
1.4142135623730951
1 1 1 1
0.0
| Name |
|---|


