Practice - 5 Tasks
Answer the questions below
1fill in blank
easyComplete the code to arm the drone safely.
Drone Programming
if drone.[1](): print("Drone is armed.")
Attempts:
3 left
💡 Hint
Common Mistakes
Using 'disarm()' instead of 'arm()' will not arm the drone.
Using 'takeoff()' before arming causes errors.
✗ Incorrect
The method to arm the drone is 'arm()'. Calling drone.arm() starts the arming sequence.
2fill in blank
mediumComplete the code to disarm the drone after landing.
Drone Programming
if drone.[1](): print("Drone is disarmed.")
Attempts:
3 left
💡 Hint
Common Mistakes
Calling 'arm()' instead of 'disarm()' will keep the drone powered.
Calling 'takeoff()' instead of 'disarm()' is incorrect here.
✗ Incorrect
The method to disarm the drone is 'disarm()'. Calling drone.disarm() safely powers down the motors.
3fill in blank
hardFix the error in the arming check condition.
Drone Programming
if drone.[1]() == True: print("Drone armed successfully.")
Attempts:
3 left
💡 Hint
Common Mistakes
Using 'arm()' in condition calls the arming action instead of checking status.
Using 'disarm()' or 'takeoff()' in condition is incorrect.
✗ Incorrect
The correct way to check if the drone is armed is to call 'is_armed()' method, not 'arm()'.
4fill in blank
hardFill both blanks to safely arm and take off the drone.
Drone Programming
if drone.[1](): drone.[2]()
Attempts:
3 left
💡 Hint
Common Mistakes
Calling 'disarm()' before takeoff causes failure.
Calling 'land()' instead of 'takeoff()' will not make the drone fly.
✗ Incorrect
First, call 'arm()' to arm the drone, then call 'takeoff()' to make it fly.
5fill in blank
hardFill all three blanks to check if the drone is armed, land it, and then disarm.
Drone Programming
if drone.[1](): drone.[2]() drone.[3]()
Attempts:
3 left
💡 Hint
Common Mistakes
Using 'arm()' instead of 'is_armed()' in the condition.
Calling 'takeoff()' instead of 'land()' before disarming.
✗ Incorrect
First check if drone is armed with 'is_armed()', then land it with 'land()', and finally disarm with 'disarm()'.
