runtime
64 / 500
question 64 Lists & Tuples · easy

Impossible GPS points

A delivery driver's app records a track of (latitude, longitude) points. A latitude must be between -90 and 90, and a longitude between -180 and 180, both inclusive. Print the positions (counting from 0) of every impossible point as a list. If every point is valid, print all valid.

Inputtrack, a list of (latitude, longitude) tuples
Valid-90 <= latitude <= 90 and -180 <= longitude <= 180
Printsthe list of positions of invalid points, or all valid
Examplesthe starter's track → [1, 3]; [(0, 0)] → all valid
Expected output1 line
  1. 1[1, 3]

Loading your progress…

Impossible GPS points — Python practice · Runtime