The Stacks
UNIT 2 · 25–35% OF THE EXAM · 12 TOPICS

Selection and Iteration

Conditionals and loops — the control flow that makes programs do something interesting. FRQ 1 (Methods and Control Structures) lives entirely here, and a large share of the multiple choice is tracing loops.

What the College Board expects you to walk away understanding

  • Boolean expressions drive selection; compound conditions, short-circuit evaluation, and De Morgan's laws determine exactly which branch runs.
  • while and for loops repeat code; the loop condition and update determine how many times.
  • Standard algorithms — sum, count, max, string processing — are built from selection and iteration in predictable shapes.
  • Nested loops multiply iterations, and informal run-time analysis counts statement executions.

Topics in this Unit

Night-before review

Every key term and exam tip from this unit on one printable page.

□Unit 2 cheat sheetprint