Below is a python program to calculate the distance between London and NewYork city.
1 2 3 4 5 | from geopy import distance london = ("51.5074° N, 0.1278° W") newyork = ("40.7128° N, 74.0060° W") print("Distance between London and New York city (in km):") print(distance.distance(london, newyork).km," kms") |
Program Output
1 2 | Distance between London and New York city (in km): 5585.233578931302 kms |
If you like this question & answer and want to contribute, then write your question & answer and email to freewebmentor[@]gmail.com. Your question and answer will appear on FreeWebMentor.com and help other developers.