3. Python Program Control Flow#

So far we have learned computer programming that only works in a linear fashion. There are times when we may want to only have a program do certain tasks under certain conditions or do things repetitively with small variations. These programatic elements enhance our ability to make Python scripts that work for a wider array of circumstances. In this chapter we’ll look at using if statements and looping to control the flow of Python scripts.