0
0
Drone Programmingprogramming~10 mins

Why simulation prevents costly crashes in Drone Programming - Test Your Understanding

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

Complete the code to start the drone simulation.

Drone Programming
simulation.[1]()
Drag options to blanks, or click blank then click option'
Alaunch
Bstop
Cstart
Dpause
Attempts:
3 left
💡 Hint
Common Mistakes
Using 'launch' instead of 'start' causes an error because 'launch' is not defined.
2fill in blank
medium

Complete the code to check if the drone has crashed in simulation.

Drone Programming
if drone.[1] == True:
    print('Crash detected!')
Drag options to blanks, or click blank then click option'
Abattery_low
Bis_flying
Cis_landed
Dhas_crashed
Attempts:
3 left
💡 Hint
Common Mistakes
Checking 'is_flying' will not detect crashes.
3fill in blank
hard

Fix the error in the code to safely land the drone after simulation.

Drone Programming
drone.[1]()
Drag options to blanks, or click blank then click option'
Afly
Bland
Ctakeoff
Dcrash
Attempts:
3 left
💡 Hint
Common Mistakes
Using 'takeoff' or 'fly' will cause errors or unsafe behavior.
4fill in blank
hard

Fill both blanks to create a dictionary of drone status with battery and altitude.

Drone Programming
status = {'battery': drone.[1], 'altitude': drone.[2]
Drag options to blanks, or click blank then click option'
Abattery_level
Baltitude_meters
Cbattery_percentage
Daltitude_feet
Attempts:
3 left
💡 Hint
Common Mistakes
Using 'battery_level' or 'altitude_feet' may not match the drone API.
5fill in blank
hard

Fill all three blanks to filter sensor data for values above threshold.

Drone Programming
filtered = {sensor: value for sensor, value in data.items() if value [1] threshold and sensor [2] 'temp' and value [3] 0}
Drag options to blanks, or click blank then click option'
A>
B!=
C>=
D<
Attempts:
3 left
💡 Hint
Common Mistakes
Using wrong comparison operators causes wrong filtering or errors.