0
0
Drone Programmingprogramming~10 mins

Career opportunities in drone technology 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 define a drone's basic takeoff function.

Drone Programming
def takeoff():
    print("Drone is [1]")
Drag options to blanks, or click blank then click option'
Alanding
Bhovering
Ctaking off
Dcharging
Attempts:
3 left
💡 Hint
Common Mistakes
Using 'landing' or 'charging' instead of 'taking off'.
2fill in blank
medium

Complete the code to check if the drone's battery level is sufficient for flight.

Drone Programming
if battery_level [1] 20:
    print("Battery low, please recharge.")
Drag options to blanks, or click blank then click option'
A<=
B>
C==
D!=
Attempts:
3 left
💡 Hint
Common Mistakes
Using '>' instead of '<=' which would check for high battery.
3fill in blank
hard

Fix the error in the drone's altitude adjustment code.

Drone Programming
altitude [1] 5
Drag options to blanks, or click blank then click option'
A+=
B/=
C*=
D-=
Attempts:
3 left
💡 Hint
Common Mistakes
Using '-' which decreases altitude instead of increasing it.
4fill in blank
hard

Fill both blanks to create a dictionary of drone models and their max flight times.

Drone Programming
flight_times = {"ModelA": [1], "ModelB": [2]
Drag options to blanks, or click blank then click option'
A30
B45
C60
D15
Attempts:
3 left
💡 Hint
Common Mistakes
Using strings instead of numbers for flight times.
5fill in blank
hard

Fill all three blanks to filter drones with battery life greater than 40 and create a new dictionary.

Drone Programming
filtered_drones = [1]: [2] for [3], [2] in drones.items() if [2] > 40}
Drag options to blanks, or click blank then click option'
Amodel
Bbattery
Cdrones
Dbattery_life
Attempts:
3 left
💡 Hint
Common Mistakes
Mixing variable names or using undefined variables.