Skip to content
Marlbridge

AP® Computer Science A · Unit 2 · Topic 2.11

Nested Iteration: Topic Checklist (Computer Science A 2.11)

Specific I can statements for nested loops, their order of execution and how often they run, each linked to the guide section or practice question that tests it.

Work through the list without notes. If you cannot do a statement, follow its link, then come back. Guide = study guide; Practice = practice questions.

Understanding

  • I can state what happens to the inner loop each time the outer loop runs once. (Guide: “A loop inside a loop”; Practice question 1)
  • I can explain why println placed after the inner loop ends each row. (Guide: “Rows and columns”; Practice questions 2 and 7)
  • I can explain why an inner while loop variable must be set again on each outer pass. (Guide: “The inner variable must start again”; Practice questions 4 and 9)
  • I can explain how the inner bound depending on the outer variable changes the count. (Guide: “When the inner bound depends on the outer variable”; Practice question 3)

Skills

  • I can trace nested loops and predict printed patterns. (Guide: “Rows and columns”; Practice questions 2 and 6)
  • I can count how many times the innermost statement runs for rectangular and triangular bounds. (Guide: Worked example 1; Practice questions 1, 3 and 5)
  • I can write nested loops that print a rectangle or a staircase. (Guide: “Rows and columns”; Practice question 7)
  • I can write nested loops that test every pair of values. (Guide: Worked example 2; Practice question 8)

Reasoning

  • I can find and fix a nested loop whose inner variable is not reset. (Guide: “The inner variable must start again”; Practice question 9)
  • I can compare how the work grows for nested loops with different bounds. (Guide: Worked example 1; Practice question 10)
  • I can choose j = i or j = i + 1 as the inner start to include or exclude equal pairs. (Guide: Worked example 2; Practice question 8)

All ticked? Move on to the Topic 2.12 study guide, Informal Run-Time Analysis.

AP® and Advanced Placement® are trademarks registered by the College Board, which is not affiliated with, and does not endorse, this website. Marlbridge is an independent tuition provider. It is not an authorized AP course provider, an AP school or an exam centre, and these resources are not official College Board materials. Reading them or doing simulations does not meet the laboratory requirement of an AP science course.