CompSci.rocks

Nested Iteration and Run-Time Analysis

Free AP Computer Science A multiple-choice practice for topics 2.11–2.12, Unit 2 (Selection and Iteration). Answer five random questions, check your work, and review the essential knowledge behind each one.

Unit 2: Selection and Iteration. Topics 2.11–2.12. This set has 56 questions. Each time the page loads you get five of them, chosen at random. Pick an answer, press Check answer, and read the explanation for every choice. Reload the page or use New questions for a fresh five.

Topics assessed

  • 2.11 Nested Iteration
  • 2.12 Informal Run-Time Analysis

Practice questions

Loading questions…

Essential knowledge for this set

These are the essential knowledge (EKS) statements from the AP Computer Science A Course and Exam Description that the 56 questions in this set assess, grouped by topic and learning objective. The table under each question links here.

Topic 2.11: Nested Iteration

2.11.A — Develop code to represent nested iterative processes and determine the result of these processes.

  • 2.11.A.1 Nested iteration statements are iteration statements that appear in the body of another iteration statement. When a loop is nested inside another loop, the inner loop must complete all its iterations before the outer loop can continue to its next iteration.

Topic 2.12: Informal Run-Time Analysis

2.12.A — Calculate statement execution counts and informal run-time comparison of iterative statements.

  • 2.12.A.1 A statement execution count indicates the number of times a statement is executed by the program. Statement execution counts are often calculated informally through tracing and analysis of the iterative statements.