0
0
Drone Programmingprogramming~10 mins

Indian drone regulations (DGCA rules) in Drone Programming - Interactive Code Practice

Choose your learning style9 modes available
Practice - 5 Tasks
Answer the questions below
1fill in blank
easy

Complete the code to set the maximum allowed drone weight as per DGCA rules.

Drone Programming
max_weight_kg = [1]
Drag options to blanks, or click blank then click option'
A1000
B25
C500
D50
Attempts:
3 left
💡 Hint
Common Mistakes
Choosing 25 kg which is the Nano drone limit, not the max allowed.
2fill in blank
medium

Complete the code to check if drone registration is required based on weight.

Drone Programming
requires_registration = drone_weight_kg [1] 250
Drag options to blanks, or click blank then click option'
A>=
B==
C<
D<=
Attempts:
3 left
💡 Hint
Common Mistakes
Using '<' which would register drones under 250 grams incorrectly.
3fill in blank
hard

Fix the error in the code that checks if drone flight is allowed in restricted zones.

Drone Programming
if flight_zone == 'restricted' and drone_category [1] 'Nano':
    allow_flight = False
Drag options to blanks, or click blank then click option'
A<
B!=
C>
D==
Attempts:
3 left
💡 Hint
Common Mistakes
Using '==' which would block Nano drones incorrectly.
4fill in blank
hard

Fill both blanks to create a dictionary comprehension that maps drone categories to their max weight limits if the weight is less than 500 kg.

Drone Programming
weight_limits = {category: [1] for category, weight in drone_data.items() if weight [2] 500}
Drag options to blanks, or click blank then click option'
Aweight
B>
C<
Dcategory
Attempts:
3 left
💡 Hint
Common Mistakes
Using '>' which would select weights above 500 kg incorrectly.
5fill in blank
hard

Fill all three blanks to create a filtered dictionary of drones with registration required and weight over 250 grams.

Drone Programming
registered_drones = { [1]: [2] for [3], [2] in drones.items() if [2] >= 250 }
Drag options to blanks, or click blank then click option'
Adrone_id
Bweight
Cdrone
Did
Attempts:
3 left
💡 Hint
Common Mistakes
Using inconsistent variable names causing errors.