Complete the code to set the drone's speed to 5 meters per second.
drone.set_speed([1])The drone's speed is set by passing the desired speed value to set_speed(). Here, 5 means 5 meters per second.
Complete the code to increase the drone's speed by 2 meters per second.
drone.set_speed(drone.speed [1] 2)
To increase speed, add 2 to the current speed using the plus operator +.
Fix the error in the code to set the drone speed only if it is less than 10.
if drone.speed [1] 10: drone.set_speed(10)
The condition should check if the current speed is less than 10 using the < operator.
Fill both blanks to create a dictionary of speeds for each waypoint where speed is doubled if altitude is above 100.
speeds = {wp: drone.speed [1] 2 for wp, alt in waypoints.items() if alt [2] 100}The speed is doubled using * and the altitude condition checks if altitude is greater than 100 using >.
Fill all three blanks to create a dictionary mapping waypoint names in uppercase to their speeds if speed is above 3.
speed_map = { [1]: [2] for [3], speed in drone_data.items() if speed > 3 }The key is the waypoint name in uppercase using wp.upper(), the value is the speed, and the loop variable for waypoint is wp.