0
0
Drone Programmingprogramming~10 mins

Receiving telemetry data in Drone Programming - Interactive Code Practice

Choose your learning style9 modes available
Practice - 5 Tasks
Answer the questions below
1fill in blank
easy

Complete the code to receive telemetry data from the drone.

Drone Programming
telemetry = drone.[1]()
Drag options to blanks, or click blank then click option'
Aconnect
Bsend_command
Cget_telemetry
Ddisconnect
Attempts:
3 left
💡 Hint
Common Mistakes
Using 'send_command' instead of 'get_telemetry'.
Trying to use 'connect' to receive data.
2fill in blank
medium

Complete the code to extract the drone's altitude from the telemetry data.

Drone Programming
altitude = telemetry.[1]['altitude']
Drag options to blanks, or click blank then click option'
Asend
Bstatus
Creceive
Ddata
Attempts:
3 left
💡 Hint
Common Mistakes
Using 'send' or 'receive' instead of 'data'.
Trying to access 'status' which is not the telemetry dictionary.
3fill in blank
hard

Fix the error in the code to correctly print the drone's battery level from telemetry.

Drone Programming
print('Battery level:', telemetry.[1]['battery'])
Drag options to blanks, or click blank then click option'
Adata
Bbattery
Cstatus
Dbattery_level
Attempts:
3 left
💡 Hint
Common Mistakes
Trying to access 'battery' directly on telemetry.
Using 'battery_level' which is not an attribute.
4fill in blank
hard

Fill both blanks to create a dictionary of altitude and speed from telemetry data.

Drone Programming
info = {'altitude': telemetry.[1]['altitude'], 'speed': telemetry.[2]['speed']}
Drag options to blanks, or click blank then click option'
Adata
Bstatus
Cinfo
Dmetrics
Attempts:
3 left
💡 Hint
Common Mistakes
Using different attributes for altitude and speed.
Using 'status' or 'info' which do not hold telemetry data.
5fill in blank
hard

Fill all three blanks to filter telemetry data for altitude above 100 and speed below 50.

Drone Programming
filtered = {k: v for k, v in telemetry.[1].items() if telemetry.[1]['altitude'] [2] 100 and telemetry.[1]['speed'] [3] 50}
Drag options to blanks, or click blank then click option'
Adata
B>
C<
Dstatus
Attempts:
3 left
💡 Hint
Common Mistakes
Using 'status' instead of 'data'.
Mixing up comparison operators.