Presentation is loading. Please wait.

Presentation is loading. Please wait.

Lesson 5-15 AP Computer Science Principles

Similar presentations


Presentation on theme: "Lesson 5-15 AP Computer Science Principles"— Presentation transcript:

1 Lesson 5-15 AP Computer Science Principles
Processing Arrays Lesson 5-15 AP Computer Science Principles

2 Objectives Students will be able to:
Use a for loop in a program to implement an algorithm that processes all elements of an array. Write code that implements a linear search on an unsorted array of numbers. Write code to find the minimum value in an unsorted list of numbers. Explain how binary search is more efficient than linear search but can only be used on sorted lists.

3 Processing Lists Today we’re going to begin to write code to process lists of data. Processing large lists of data is one of the most powerful things computer programs can do. Many of the most important algorithms in computer science have their roots in processing lists of data. As a warm-up, we’ll begin thinking about algorithms that process lists with a short activity.

4 Minimal Card - Rules Remember in a lesson a while back when we wrote algorithms for playing cards using the “Human Machine Language”? Notice how a row of cards is kind of like a list. Today we’re going to begin to write code to process lists of data. Processing large lists of data is one of the most powerful things computer programs can do. Many of the most important algorithms in computer science have their roots in processing lists of data. So as a warm-up today, lets think back to algorithms that process lists with a short activity.

5 Activity - Minimum Card Algorithm
Complete the “Activity - Minimum Card Algorithm”

6 Video

7 Stage 15 Complete Stage 15


Download ppt "Lesson 5-15 AP Computer Science Principles"

Similar presentations


Ads by Google