Overview

Being able to specify a certain number of times that you want some code to be executed through iteration is a powerful tool in programming. Today is focused on one form of iteration, a definite loop, also called a for-loop.

Basic Learning Objectives

Before class, you should be able to:

  • Iterate over a sequence
  • Iterate a certain number of times using range
  • Explain what the accumulator pattern is

Advanced Learning Objectives

After class, you should be able to:

  • Solve a problem using the accumulator pattern
  • Traverse a sequence by index

Resources

Read/watch the following and complete the embedded checks: