Question: PLE HELP ME BY PYTHON PLE HELP ME BY PYTHON Part 3: Spherical Distance The earth is not flat (sorry to disappoint you), so the
PLE HELP ME BY PYTHON

PLE HELP ME BY PYTHON
Part 3: Spherical Distance The earth is not flat (sorry to disappoint you), so the shortest distance between two points is not a straight line but the great circle.Write a function called great_circle_distance that has four parameters: the latitude and longitude (in degrees) of one city and the latitude and longitude (in degrees) of another city. The function returns the distance between the cities in kilometers, using this formula, which is accurate for large distances: Let 01.11 be the latitude and longitude of the first city (in radians). Let 02. 12 be the latitude and longitude of the second city (in radians) Let Rbe 6371, the radius of the earth in kilometers. Calculate the central angle with this formula: 0 = arccos(sin 01. sin 02 + cos 01.COS 02.cos(11-21) The great circle distance d=R.O Write another function named km_to_miles which has one parameter-the distance in kilometers-and returns the distance in miles. One kilometer is 0.621371 miles. Given these latitudes and longitudes: City Latitude Longitude San Jose 37.33 -121.90 Chicago 41.83 -87.68 Washington, D.C. 38.90 -77.02 Write a program that calculates the distance from San Jose to Chicago, and the distance from Chicago to Washington D.C. and prints the distances in both miles and kilometers, properly labeled, as integers. You may use this site u to check your answers. Name the program Lastname_firstname_great_circle.py
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
