Complete the code to receive telemetry data from the drone.
telemetry = drone.[1]()The get_telemetry() method is used to receive telemetry data from the drone.
Complete the code to extract the drone's altitude from the telemetry data.
altitude = telemetry.[1]['altitude']
The telemetry data is stored in the data attribute, which is a dictionary containing keys like 'altitude'.
Fix the error in the code to correctly print the drone's battery level from telemetry.
print('Battery level:', telemetry.[1]['battery'])
The telemetry dictionary is accessed via the data attribute, which contains the 'battery' key.
Fill both blanks to create a dictionary of altitude and speed from telemetry data.
info = {'altitude': telemetry.[1]['altitude'], 'speed': telemetry.[2]['speed']}Both 'altitude' and 'speed' are keys inside the telemetry's data dictionary.
Fill all three blanks to filter telemetry data for altitude above 100 and speed below 50.
filtered = {k: v for k, v in telemetry.[1].items() if telemetry.[1]['altitude'] [2] 100 and telemetry.[1]['speed'] [3] 50}The telemetry data is in data. We filter where altitude is greater than 100 and speed is less than 50.