Complete the code to start the drone's search mode.
drone.[1]()The takeoff() command makes the drone start flying and begin the search.
Complete the code to check if the drone has found a person.
if drone.detect_person() [1] True:
The condition == True checks if the drone detected a person.
Fix the error in the code to send a rescue signal when a person is found.
if drone.detect_person() == True: drone.[1]('rescue_signal')
The send() method is used to send signals like 'rescue_signal'.
Fill both blanks to create a dictionary of detected persons with their distances.
detected = {person: drone.[1](person) for person in drone.[2]()}The drone calculates distance with distance_to() for each person in detected_persons().
Fill all three blanks to filter persons within 100 meters and prepare rescue messages.
close_persons = {person: dist for person, dist in detected.items() if dist [1] 100}
messages = [f"Rescue needed for [2] at [3] meters" for person, dist in close_persons.items()]We select persons with distance less than 100 (<), then use person and dist to create messages.
