Hello i am currently trying to complete a project with a string of airports full with longitude and latitude where a user would be able to get either the minimum distance of said airports or if he the distance between 2 of them if he so chooses to.I am going to complete this using haversine formula. but for now i am stuck in setting my function for the minimum distance and the function if 2 airports are chosen from the list.I dont know it id get past it but for now traceback sais radians is string so nada.

First of all thanks for any and all help!

I would appreciate it if u could offer hints instead of complete code parts

Blockquote

import math

airports =

airport_info = “”"

country1 40.855869°N 25.956264°E

c2 37.936389°N 23.947222°E

c3 35.531667°N 24.149722°E

c4 38.343056°N 26.140556°E

c5 39.601944°N 19.911667°E

c6 35.339722°N 25.180278°E

c7 37.068333°N 22.025556°E

c8 40.913333°N 24.619167°E

c9 38.12°N 20.500278°E

c10 36.793336°N 27.091667°E

c11 39.917072°N 25.236308°E

c12 39.0567°N 26.5994°E

c13 37.020833°N 25.113056°E

c14 36.405419°N 28.086192°E

15 37.6891°N 26.9116°E

16 40.519722°N 22.970833°E

c17 37.750833°N 20.884167°E"""

part = airport_info.split()

airports = list(zip(part[1: : 3], part[2: : 3]))

airports2 = airports[0: ]

def distance():

```
for i in range(len(airports) - 1):
lon1 = radians(airports[i][1])
lat1 = radians(airports[i][2])
for j in range(len(airports2) - 1):
lon2 = radians(airports[i+1][1])
lat2 = radians(airports[i+1][2])
dlon = lon2 - lon1
dlat = lat2 - lat1
a = sin(dlat / 2)**2 + cos(lat1) * cos(lat2) * sin(dlon / 2)**2
c = 2 * atan2(sqrt(a), sqrt(1 - a))
distance = R * c
distance_list = []
distance_list.append(distance)
return min(sorted.distance_list)
```

Blockquote