AP CSP Day 58: Robot Grid Navigation

Big Idea 3
Day 58 Practice
Focus: Robot Grid Navigation

Practice Question

A robot in a grid can use MOVE_FORWARD() and ROTATE_LEFT(). It starts facing north. After ROTATE_LEFT(), ROTATE_LEFT(), MOVE_FORWARD(), which direction has it moved?
Why This Answer?

Starting facing north, first ROTATE_LEFT faces west, second ROTATE_LEFT faces south. MOVE_FORWARD then moves south.

Why Not the Others?

A) Would need 4 left rotations to face north again.

C) Would need 1 right rotation (or 3 left).

D) Would need 1 left rotation only.

Common Mistake
Watch Out!

Losing track of robot orientation. Draw it out: each ROTATE_LEFT is 90° counterclockwise.

AP Exam Tip

For robot problems, track orientation after each command. Draw cardinal directions and trace movements.

Keep Practicing!

Daily practice builds AP CSP mastery.

Study Guide Get Tutoring
Back to blog

Leave a comment

Please note, comments need to be approved before they are published.