Complete the code to extract the latitude from the GPS data dictionary.
latitude = gps_data[1]The GPS data is stored as a dictionary. To get the latitude value, use the key 'latitude' inside square brackets.
Complete the code to calculate the distance between two GPS points using the Haversine formula.
distance = 2 * radius * math[1](math.sqrt(a))
The Haversine formula uses the arcsine function, which is math.asin in Python, to calculate the central angle.
Fix the error in the code to convert GPS coordinates from degrees to radians.
lat_rad = math[1](lat_deg)To convert degrees to radians, use math.radians(). The other options are invalid functions.
Fill both blanks to create a dictionary comprehension that maps each GPS point's ID to its altitude if altitude is above 100 meters.
altitudes = {point[1]: data[2] for point, data in gps_points.items() if data['altitude'] > 100}Use ['id'] to get the point's ID and ['altitude'] to get the altitude from the data dictionary.
Fill both blanks to filter GPS points with latitude greater than 40, and create a dictionary with uppercase IDs as keys and their longitude as values.
filtered = {point[1]: data[2] for point, data in gps_data.items() if data['latitude'] > 40}Start the dictionary with {, use point.upper() to uppercase the ID, and access longitude with data['longitude'].