Complete the code to send a message from one drone to another.
drone1.send_message([1])The send_message function requires a message string to send. Here, we send "Hello Drone 2".
Complete the code to receive a message on drone2.
message = drone2.[1]()send_message() instead of receive_message().The receive_message() function is used to get incoming messages on a drone.
Fix the error in the code to broadcast a message to all drones.
network.[1]("Start mission")
send_message() which sends to one drone only.receive_message() which is for receiving.To send a message to all drones, use broadcast_message().
Fill both blanks to check if drone3 is connected and then send a message.
if drone3.[1](): drone3.[2]("Ready")
connect() instead of is_connected() to check status.receive_message() instead of send_message() to send.First, check connection with is_connected(). Then send message with send_message().
Fill all three blanks to create a dictionary of drone IDs and their last received messages if the message length is greater than 5.
messages = {drone.[1]: drone.[2]() for drone in fleet if len(drone.[3]()) > 5}send_message() instead of receive_message().Use id for drone ID, receive_message() to get messages, and check length of received message.