Question: Python (Central city) Given a set of cities, the central point is the city that has the shortest total distance to all other cities. Write
Python
(Central city)
Given a set of cities, the central point is the city that has the shortest total distance to all other cities. Write a program that prompts the user to enter the number of the cities and the locations of the cities (that is, their coordinates), and finds the central city. Note that the coordinates are entered in one line.
Sample Run
Enter the coordinates of the cities: 2.5 5 5.1 3 1 9 5.4 54 5.5 2.1
The central city is at (2.5, 5)
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
