Introduction
Controlling a drone means moving it smoothly in different directions. Knowing how to move forward, backward, and sideways helps you guide the drone exactly where you want it to go.
Imagine walking down a hallway. Moving forward is like walking straight ahead. Moving backward is like stepping back without turning around. Moving sideways is like sidestepping to avoid an obstacle while still facing forward.
↑ Forward
│
← Lateral │ Lateral →
│
↓ Backwardmove_forward(distance) moves the drone forward by the given distance.move_forward(5) is the correct command.move_left(3) uses move_left(3) which is correct. moveLeft(3) uses camelCase which is incorrect here. move_left 3 misses parentheses. move_left(three) uses a word instead of a number.move_forward(4) move_right(3) move_backward(2) move_left(1)
move_forward(5) move_left(2) move_backward() move_right(3)
move_forward(4)
move_right(4)
move_backward(4)
move_left(4) follows forward, right, backward, left by 4 meters each, completing a square back to start.Pass the test and this pattern moves unknown