Answers for "find distance of python"

0

calculate distance in python

from math import sqrt
def main():
	point1x, point1y = eval(input("Please enter coordinates of Point1 (use commas) "))
	point2x, point2y = eval(input("Please enter coordinates of Point2 (use commas)"))
	
	Distance = sqrt((point1x-point2x)**2 + (point1y-point2y)**2)
	print("The distance between this two points is", str(round(Distance, 4))+" units")
Posted by: Guest on September-24-2020

Code answers related to "find distance of python"

Python Answers by Framework

Browse Popular Code Answers by Language