Welcome to the "Iteration & Flow" unit of the Python Academy! In this notebook, you will learn:
- Flow Control
- Indentation
if-elif-elsestatements- Loops:
whileandfor continueandbreak- List Comprehension
Building a program is essentially defining actions to perform depending on certain conditions. This can be setting up an alarm to trigger at midnight (time >> alarm), a weather forecast app (metereological conditions >> forecast) or discovering business insights from the latest financial reports (financial values >> analysis). Flow Control is what allows you to check for conditions, act accordingly and iterate on repeatable code.
In Python, the main concepts for flow control comprise:
ifa condition do something, or somethingelse
whilea certain condition is true, continue iterating until it no longer appliesfora specific number of times, repeat the same action- manually controlling to
continueto the next iteration of a loop, or elsebreakthe loop immediately.
List/dict/set comprehension is one of the things you want to be comfortable with if you want to write decent Python code. In here we present a short introductory video
and a more in-depth explannation



