20 lines
562 B
Python
20 lines
562 B
Python
import math
|
|
RADIUS = 3956.6
|
|
|
|
def distance(lat1, long1, lat2, long2):
|
|
lat1 = math.radians(lat1)
|
|
long1 = math.radians(long1)
|
|
lat2 = math.radians(lat2)
|
|
long2 = math.radians(long2)
|
|
the_cos = math.sin(lat1) * math.sin(lat2) + math.cos(lat1) * math.cos(lat2) * math.cos(long1 - long2)
|
|
arc_length = math.acos(the_cos)
|
|
return arc_length * RADIUS
|
|
|
|
def find(target, file):
|
|
|
|
|
|
def main():
|
|
zip = input("What Zip code are you interested in? ")
|
|
target = float(input("And what proximity (in miles)? "))
|
|
with open("zipcodes.txt") as file:
|