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.

25–35% of the AP Exam ~29–31 class periods 12 topics

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

  1. 2.1 · Algorithms with selection and repetition
  2. 2.2 · Boolean expressions
  3. 2.3 · if statements
  4. 2.4 · Nested if statements
  5. 2.5 · Compound Boolean expressions
  6. 2.6 · Comparing Boolean expressions
  7. 2.7 · while loops
  8. 2.8 · for loops
  9. 2.9 · Implementing selection and iteration algorithms
  10. 2.10 · Implementing String algorithms
  11. 2.11 · Nested iteration
  12. 2.12 · Informal run-time analysis
  13. The project · Magpie
  14. 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.

2 Get in

Open the class link your teacher posted — that's the usual way, and it enrols you on the spot. Or paste an access key if you were handed one.

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.