Python

No description

fork
loading
Files
  • main.py
main.py
1
2
3
4
5
6
7
8
9
import math
x = float(input("Enter x coordinate of first point: "))
y = float(input("Enter y coordinate of first point: "))
x2 = float(input("Enter x2 coordinate of first point: "))
y2 = float(input("Enter y2 coordinate of second point: "))
xd = (x2 - x) ** 2
yd = (y2 - y) ** 2
d = math.sqrt(xd + yd)
print(d)