Challenge - 5 Problems
DGCA Drone Master
Get all challenges correct to earn this badge!
Test your skills under time pressure!
❓ Predict Output
intermediate2:00remaining
Output of Drone Flight Authorization Check
What is the output of this code that checks if a drone flight is authorized based on altitude and no-fly zone?
Drone Programming
def check_authorization(altitude, in_no_fly_zone): if altitude > 400: return "Flight not authorized: altitude too high" if in_no_fly_zone: return "Flight not authorized: no-fly zone" return "Flight authorized" print(check_authorization(350, False))
Attempts:
2 left
💡 Hint
Check the altitude and no-fly zone conditions carefully.
✗ Incorrect
The altitude is 350 which is less than 400, and the drone is not in a no-fly zone, so the flight is authorized.
🧠 Conceptual
intermediate1:30remaining
Understanding Drone Weight Categories
According to DGCA rules, which weight category does a drone weighing 3.5 kg belong to?
Attempts:
2 left
💡 Hint
Check the weight ranges for each category carefully.
✗ Incorrect
A drone weighing 3.5 kg falls into the Small drone category which is from 2 kg to 25 kg.
🔧 Debug
advanced2:00remaining
Identify the Error in Geo-fencing Code
What error does this code raise when checking if a drone is inside a geo-fenced area?
Drone Programming
def is_inside_geo_fence(lat, lon, fence): return fence['lat_min'] <= lat <= fence['lat_max'] and fence['lon_min'] <= lon <= fence['lon_max'] fence = {'lat_min': 12.0, 'lat_max': 13.0, 'lon_min': 77.0} print(is_inside_geo_fence(12.5, 77.5, fence))
Attempts:
2 left
💡 Hint
Check if all required keys exist in the fence dictionary.
✗ Incorrect
The fence dictionary is missing the 'lon_max' key, so accessing it raises a KeyError.
📝 Syntax
advanced1:30remaining
Syntax Error in Drone Flight Plan Dictionary
Which option contains the correct syntax for defining a drone flight plan dictionary with keys 'start', 'end', and 'altitude'?
Attempts:
2 left
💡 Hint
Check commas and quotes around keys.
✗ Incorrect
Options A and C are correct syntax. Option B misses a comma, Option D misses quotes around 'altitude'.
🚀 Application
expert2:30remaining
Calculate Total Flight Time with Battery Constraints
Given a drone with a battery capacity of 6000 mAh and a consumption rate of 1200 mAh per 10 minutes, what is the maximum flight time in minutes?
Attempts:
2 left
💡 Hint
Divide battery capacity by consumption rate per minute.
✗ Incorrect
Consumption rate is 1200 mAh per 10 minutes = 120 mAh per minute. Total flight time = 6000 / 120 = 50 minutes.