0
0
Drone Programmingprogramming~10 mins

Delivery drone concept 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 set the drone's speed to 10 meters per second.

Drone Programming
drone.speed = [1]
Drag options to blanks, or click blank then click option'
A'fast'
Bspeed
Cdrone.speed
D10
Attempts:
3 left
💡 Hint
Common Mistakes
Using a string like 'fast' instead of a number.
Using the variable name instead of a value.
2fill in blank
medium

Complete the code to make the drone fly to the coordinates (50, 100).

Drone Programming
drone.fly_to([1], 100)
Drag options to blanks, or click blank then click option'
A100
B50
Cy
Dx
Attempts:
3 left
💡 Hint
Common Mistakes
Using variable names instead of numbers.
Swapping the coordinates.
3fill in blank
hard

Fix the error in the code to check if the drone's battery is above 20%.

Drone Programming
if drone.battery [1] 20:
Drag options to blanks, or click blank then click option'
A>
B<
C==
D=
Attempts:
3 left
💡 Hint
Common Mistakes
Using assignment operator '=' instead of comparison.
Using less than '<' instead of greater than.
4fill in blank
hard

Fill both blanks to create a dictionary of package weights for delivery.

Drone Programming
package_weights = { [1]: 5, [2]: 3 }
Drag options to blanks, or click blank then click option'
A'package1'
B'weight1'
C'package2'
D'weight2'
Attempts:
3 left
💡 Hint
Common Mistakes
Using weight names as keys instead of package names.
Forgetting quotes around string keys.
5fill in blank
hard

Fill all three blanks to create a dictionary of deliveries with package names, weights, and a condition for heavy packages.

Drone Programming
deliveries = { [1]: [2] for [3] in packages if packages[[3]] > 4 }
Drag options to blanks, or click blank then click option'
A'package'
Bweight
Cpackage
Dpkg
Attempts:
3 left
💡 Hint
Common Mistakes
Using the same name for key and loop variable.
Using strings instead of variable names.