AP Computer Science A · Lesson 2.14 · Unit 2 · CED topic 2.12

Informal run-time analysis

Name:   Date:  

1 Why this lesson matters

Read the opening paragraph and the "Required content" box on the lesson page. In your own words, explain each objective below.

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

2 Statement execution counts

Read this section. In your own words, summarize the main idea.

3 Comparing two segments

Read this section. In your own words, summarize the main idea.

4 Worked example

Read the "Worked example" box. Then, without looking back, try writing your own answer below.

How many times does the statement in the inner loop run?

5 Exam focus: avoid this mistake

Read the "Exam focus" box, then restate it in your own words.

6 Sum it up

In two or three sentences, explain this lesson's main idea to someone who has not read it.