Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

find distance between two points in python

# Python Program to explain math.dist() method
  
# Importing math module
import math
  
# One dimensional Point
  
# Coordinate of Point P
P = 3
  
# Coordinates of point Q
Q = -8
  
# Calculate the Euclidean distance 
# between points P and Q
eDistance = math.dist([P], [Q])
print(eDistance)
Source by www.geeksforgeeks.org #
 
PREVIOUS NEXT
Tagged: #find #distance #points #python
ADD COMMENT
Topic
Name
6+6 =