Challenge - 5 Problems
Drone Flight Mastery
Get all challenges correct to earn this badge!
Test your skills under time pressure!
❓ Predict Output
intermediateOutput of arming and takeoff sequence
What is the output of this drone arming and takeoff code snippet?
Drone Programming
drone.arm() drone.takeoff(10) print(drone.status())
Attempts:
2 left
💡 Hint
The drone must be armed before takeoff to reach the target altitude.
✗ Incorrect
The drone.arm() command prepares the drone for flight. Then takeoff(10) makes it rise to 10 meters. The status confirms it is armed and flying at 10 meters.
🧠 Conceptual
intermediateUnderstanding arming before takeoff
Why is it necessary to arm a drone before issuing a takeoff command?
Attempts:
2 left
💡 Hint
Think about what 'arming' means in terms of drone readiness.
✗ Incorrect
Arming the drone activates the motors and safety checks so it can take off safely. Without arming, the motors won't start.
🔧 Debug
advancedIdentify the error in this takeoff code
What error will this code produce when run?
code:
if drone.takeoff(5):
print("Takeoff successful")
else
print("Takeoff failed")
Attempts:
2 left
💡 Hint
Check the syntax of the if-else statement carefully.
✗ Incorrect
The else statement is missing a colon at the end, causing a SyntaxError.
❓ Predict Output
advancedResult of takeoff without arming
What will be the output of this code snippet?
code:
drone.takeoff(3)
print(drone.status())
Attempts:
2 left
💡 Hint
Consider what happens if takeoff is called before arming.
✗ Incorrect
The drone must be armed before takeoff. Calling takeoff without arming causes an error indicating the drone is not armed.
🚀 Application
expertSequence to safely arm and takeoff
Which option shows the correct sequence of commands to safely arm the drone and take off to 15 meters?
Attempts:
2 left
💡 Hint
Think about the order: arm first, then takeoff, then land.
✗ Incorrect
The drone must be armed before takeoff. After flying, it should land safely. Option A follows this correct order.
