Generally, Python programs execute from top to bottom, from one statement to the next. But sometimes you don't want that. Programs get way more interesting once you can change this default order of execution. Control statements within the code allow you to change the flow of your programs.
Section Overview
In this section, you'll learn all about two ways of changing the control flow:
- Conditional statements
- Loops
Get ready to mix it up!
Recap: Boolean Values
You've learned about the Boolean values True and False earlier in this course. If you need to revisit them, head back to the previous section and revisit the lessons there. You'll see that these truth values are an important aspect of allowing Python to make decisions.
Once you're confident that you know True from False, you're ready to write code that allows your programs to make decisions.