T2: Control flow#

Note

Click the and open this notebook in Colab to enable interactivity.

Note

To save your progress, make a copy of this notebook in Colab File > Save a copy and you’ll find it in My Drive > Colab Notebooks.

This week we are covering control flow, which is a broad term that describes statements that determine the order of code execution and the direction your program will take based on certain conditions being met (or not). Mastering control flow will make your code more efficient and effective!

Conditional statements#

Self-referencing assignments (optional)#

Loops#

For loops#

While loops#

For vs. While#

Logical operations (optional)#