Overview
In this long lesson, students learn to use for loops to process lists (arrays) of data in a variety of ways to accomplish various tasks like searching for a particular value, or finding the smallest value in a list. Students also reason about linear vs. binary search.Vocab
- for loop - A typical looping construct designed to make it easy to repeat a section of code using a counter variable. The for loop combines the creation of a variable, a boolean looping condition, and an update to the variable in one statement.
New Code
Resources
-
Activity Guide - Minimum Card Algorithm - Activity Guide (copy as MS Word, Google Doc)
-
Activity Guide - Card Search Algorithm - Activity Guide (copy as MS Word, Google Doc)