programming-examples/python/_Basics/Compute the distance between two points.py
2019-11-15 12:59:38 +01:00

7 lines
135 B
Python

import math
p1 = [4, 0]
p2 = [6, 6]
distance = math.sqrt( ((p1[0]-p2[0])**2)+((p1[1]-p2[1])**2) )
print(distance)