Introduction
Imagine trying to find a specific spot on Earth without any address or map. The GPS coordinate system solves this by giving every place a unique set of numbers that tell exactly where it is.
Jump into concepts and practice - no test required
Imagine the Earth as a giant basketball. Latitude lines are like the horizontal stripes around the ball, showing how far up or down you are. Longitude lines are like the vertical slices, showing how far left or right you are. Altitude is like how high you are holding the ball above the ground.
┌───────────────┐
│ N │
│ ↑ │
│ │ │
│W ←───┼───→ E │
│ │ │
│ ↓ │
│ S │
└───────────────┘
↑
│
Altitudealtitude value represent in a drone's GPS coordinate system?gps = (34.05, -118.25, 100)
latitude, longitude, altitude = gps
print(f"Lat: {latitude}, Long: {longitude}, Alt: {altitude}m")gps = (latitude, longitude, altitude) latitude = 40.7128 longitude = -74.0060 altitude = 50 print(gps)
is_above_altitude(gps, threshold) that returns True if the drone's altitude is above a given threshold. Which code correctly implements this?