Lesson 1

Decisions in programming

So far, we have made programs that run mostly blind, they do a set of predefined things, and don’t really change their behavior in any meaningful way

These kinds of programs can be useful, but most tasks require some sort of decision making.

You can give the Roomba as an example of a program (in this case a machine) that makes a decision. When our little vacuum friend hits a wall, it needs to make a decision on where to go next, in order to cover as much ground as possible.

If it ran blind, like the programs we have made in this class, it would likely get stuck somewhere and have no way to know it, or know how to get out.