Unit 02
Selection and Iteration
Decisions and repetition, the two things that turn a list of instructions into a program that responds to the world.
Every assignment filed under this unit, and where each one stands with your classes. The whole console →
- Counting the tripschecking
- Why the null check comes firstchecking
- Sequencing, selection, repetitionchecking
- At least, more than, underchecking
- The branch that never runschecking
- Same object, or same contentschecking
- Remainders, digits, and a maximumchecking
- How much work is thatchecking
- One method, three questionschecking
AP Computer Science A · members' unit
Selection and Iteration is behind a locked door
Units in AP Computer Science A are for people taking the course. Getting in takes a link or a key — signing in on its own doesn't do it.
What's in this unit · 19 min read
- 2.1 · Algorithms with selection and repetition
- 2.2 · Boolean expressions
- 2.3 · if statements
- 2.4 · Nested if statements
- 2.5 · Compound Boolean expressions
- 2.6 · Comparing Boolean expressions
- 2.7 · while loops
- 2.8 · for loops
- 2.9 · Implementing selection and iteration algorithms
- 2.10 · Implementing String algorithms
- 2.11 · Nested iteration
- 2.12 · Informal run-time analysis
- The project · Magpie
- Where this goes next
29 quick checksloop tracerchatbot sandboxtruth tablescode exercisesdebugging drills
1 Sign in
With your school Google account. This is how your work reaches the gradebook — it doesn't open the unit by itself.
A key unlocks this browser and keeps your progress here; signing in keeps it with you across devices. Either way the key itself is only ever checked as a hash. Manage all of this on your account, read what signing in stores, or go back to AP Computer Science A.
Sources
- College Board — AP Computer Science A Course and Exam Description, Effective Fall 2025
- Laurie White — Magpie Lab (AP Computer Science A lab series)