Complete the code to set the waypoint acceptance radius to 5 meters.
drone.set_waypoint_radius([1])The waypoint acceptance radius is set to 5 meters by passing 5 as the argument.
Complete the code to check if the drone is within the acceptance radius.
if drone.distance_to_waypoint() [1] drone.waypoint_radius(): print('Waypoint reached')
The drone is considered to have reached the waypoint if its distance is less than or equal to the acceptance radius.
Fix the error in the code to correctly update the acceptance radius.
drone.waypoint_radius = [1]Assigning 10 directly to the property updates the radius correctly.
Fill both blanks to create a dictionary of waypoints with their acceptance radius if the radius is greater than 3.
accepted_waypoints = {wp: [1] for wp in waypoints if wp.radius [2] 3}The dictionary comprehension includes waypoints with radius greater than 3 and maps each waypoint to its radius.
Fill all three blanks to filter waypoints with radius less than 5 and create a dictionary with waypoint names in uppercase as keys and their radius as values.
filtered = [1]: [2] for wp in waypoints if wp.radius [3] 5}
The dictionary comprehension uses uppercase waypoint names as keys, radius as values, and filters waypoints with radius less than 5.