Conditional Statements
This lesson will introduce conditional statements and focus on how to use them.
We'll cover the following
Conditional statements in Python
A conditional statement controls the flow of execution in a program based on a Boolean expression. If the expression evaluates to True
, then a different piece of code might execute, If it is False
, then some other piece of code will execute. This is also explained in the following illustration.
Get hands-on with 1400+ tech skills courses.