A full workout reading exam-style AP Pseudocode — procedures, lists, loops, and random, all at once — plus your first look at the Robot grid questions the exam loves. Trace, predict, verify.
No new reading — this is a gym. Everything here is from Units 2–3. The one new thing is the Robot notation, introduced below; its full treatment comes in Unit 4.
Still in Programs, one day before the test. The exam writes most code in AP Pseudocode, so today is pure reading practice — the notation, not new ideas — including the Robot questions that appear every year.
The method never changes: trace. Keep a little table of every variable, take the code one line at a time, and write down what changes. Never hold it in your head — the questions are designed to punish exactly that.
AP Pseudocode has a little robot on a grid. It faces one direction and obeys four commands:
| Command | What it does |
|---|---|
| MOVE_FORWARD() | move one square in the direction it faces |
| ROTATE_LEFT() | turn 90° left (counter-clockwise), staying put |
| ROTATE_RIGHT() | turn 90° right (clockwise), staying put |
| CAN_MOVE(dir) | true if the robot could move that way (no wall/edge) |
REPEAT/IF CAN_MOVE(...) over the same iteration and selection you already
know — only the “actions” are moves and turns instead of math. If you can trace a
loop, you can trace a robot. Full treatment is Unit 4; today is a first taste.
The robot starts bottom-left, facing right. Step through the commands and track both its square and its facing. Predict each step before you take it.
Eight reps in AP Pseudocode, combining everything from Units 2–3. Trace each on paper, then pick an answer.
Professional programmers spend far more time reading code — a teammate’s, an old version of their own, a library’s — than writing new code from scratch. The ability to pick up an unfamiliar program and correctly say what it does is the daily work, and it’s exactly what the exam’s pseudocode questions measure.
The trace-table habit you’re drilling isn’t a test trick; it’s how careful engineers verify that code does what they think before shipping it. Slowing down to trace is what separates “looks right” from “is right.”