0
0
Drone Programmingprogramming~10 mins

goto() command for navigation 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 make the drone fly to coordinates (10, 20, 30).

Drone Programming
drone.[1](10, 20, 30)
Drag options to blanks, or click blank then click option'
Anavigate
Bfly
Cmove
Dgoto
Attempts:
3 left
💡 Hint
Common Mistakes
Using fly() instead of goto().
Using move() which is not a valid command.
2fill in blank
medium

Complete the code to make the drone go to the point stored in variable target.

Drone Programming
drone.[1](target.x, target.y, target.z)
Drag options to blanks, or click blank then click option'
AmoveTo
Bgoto
CflyTo
DnavigateTo
Attempts:
3 left
💡 Hint
Common Mistakes
Using commands like flyTo() which do not exist.
Passing the whole target object instead of its coordinates.
3fill in blank
hard

Fix the error in the code to correctly send the drone to (5, 15, 25).

Drone Programming
drone.goto(5 [1] 15, 25)
Drag options to blanks, or click blank then click option'
A:
B;
C,
D.
Attempts:
3 left
💡 Hint
Common Mistakes
Using colons or semicolons instead of commas.
Missing commas between arguments.
4fill in blank
hard

Fill both blanks to create a dictionary of points with their altitudes using goto().

Drone Programming
points = {name: drone.[1](coords[0], coords[1], [2]) for name, coords in locations.items()}
Drag options to blanks, or click blank then click option'
Agoto
Baltitude
Ccoords[2]
Dheight
Attempts:
3 left
💡 Hint
Common Mistakes
Using incorrect command names like altitude.
Using wrong altitude values like height.
5fill in blank
hard

Fill all three blanks to filter points above altitude 50 and send the drone there.

Drone Programming
high_points = {name: drone.[1](x, y, z) for name, (x, y, z) in points.items() if z [2] 50 and name.[3]('A')}
Drag options to blanks, or click blank then click option'
Agoto
B>
Cstartswith
Dfly
Attempts:
3 left
💡 Hint
Common Mistakes
Using wrong command like fly().
Using wrong comparison operators like <.
Using incorrect string methods.