AP Computer Science A · Lesson 4.4 · Unit 4 · CED topic 4.5

Array algorithms: extremes, sums, and counts

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.

5.A. Develop code for standard and original algorithms for a particular context or specification that involves arrays and determine the result of these algorithms.

2 Minimum and maximum, sum and average

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

3 Does at least one element have a property? Do all?

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

4 Counting elements with a property

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

5 Worked example

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

A programmer seeds the maximum with 0.

6 Exam focus: avoid this mistake

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

7 Sum it up

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