Skip to content
beginner

Control Flow and Logic

Teach how to make decisions and repeat actions in Python using if statements, loops, and logical operators.

Tutorials

Articles in Control Flow and Logic

Follow these lessons in order, or jump directly to the topic you need.

beginner8 min read

If Statements in Python

Have you ever wondered how computers can play games, check passwords, or recommend what to watch next? The secret lies in their ability to make…

Read tutorial
beginner7 min read

Logical Operators in Python

Have you ever made a decision based on more than one thing? For example, maybe you’ll only go for a walk if it’s sunny and you have free time. Or perhaps…

Read tutorial
beginner8 min read

For Loops in Python

Are you ready to make your Python code smarter and more powerful? One of the first big steps is learning how to repeat actions automatically. In this…

Read tutorial
beginner8 min read

While Loops in Python

Have you ever found yourself doing something over and over until something changes? Maybe you keep checking your phone until your friend replies, or you…

Read tutorial