Chapter 05 - Controlling the Flow

In Chapter 5 the focus will be on controlling to flow of a program. We will cover three different ways to leverage the power of computers to handle repetition. The net result will be three different ways to do the same task. In programming you will often find there are multiple ways to accomplish any task.

Work through the following:

  1. Sequence LEDs with If
  2. Take Chapter 5 Quiz 1 in Schoology
  3. Sequence LEDs with While
  4. Take Chapter 5 Quiz 2 in Schoology
  5. Sequence LEDs with For
Chapter 5 Assignments:
Assignment 5.1 - Write a short paragraph explaining what incremental operators are and how you would use them.
Assignment 5.2 - Write a program that uses IF, WHILE, or FOR to sequence multiple LEDs simultaneously. Such as, “Light LEDs at both ends and have them move to the center.

Standards

A-5.1

I sequence LEDs with an “IF Loop” in either direction. Using If statements to restart the sequence.

A-5.2

I can explain the function of WHILE and use it to sequence LEDs in either direction

A-5.3 I can use a FOR statement to sequence LEDs.

B-5.4

I can explain and use “Incremental Operators”

B-5.5

I can write a program that uses IF, WHILE, or FOR to sequence multiple LEDs simultaneously. Such as, “Light LEDs at both ends and have them move to the center.”