Points Distances

Link to task itself

Submit a program that outputs 26 coordinates listed in order, closest-to-farthest (physically on the Cartesian Plane) from a single input origin.
Please use this list of labeled coordinates in a file called “coordinates.json”:


  • Create a program that will take in a single x and y coordinate as the origin. After the input is provided, the output should be all of the coordinates (all 26 coordinates read from the “coordinates.json” file), in order of closest-to-farthest from the origin.
  • So, if the origin is (6,33), then the first item in the output would be the coordinate closest to (6,33), then the second closest, then third closest, and so on for all 26 input coordinates.
  • The origin should vary; do not hardcode a static origin. Also, the coordinates must be sourced from “coordinates.json”.