Your program should display the distance between the points following the surface of the earth in kilometers. Geod ellps WGS84 for city coord in cities. X2int input enter x2.
In simple terms Euclidean distance is the shortest between the 2 points irrespective of the dimensions.
Import math printEnter the first point A x1 y1 mapint inputsplit printEnter the second point B x2 y2 mapint inputsplit dist mathsqrtx2-x12 y2-y12 printThe Euclidean Distance is strdist. Import functions import numpy as np from numpylinalg import norm define two vectors a nparray 2 6 7 7 5 13 14 17 11 8 b nparray 3 5 5 3 7 12 13 19 22 7 calculate Euclidean distance between the two vectors norm a-b 12409673645990857. Lets discuss a few ways to find Euclidean distance by NumPy library. Y1 floatinputEnter a third number.