if
, elif
, and else
branches.and
and or
.
Please use the Jupyter notebook named "05MakingChoices.ipynb" for this lesson. If you haven't downloaded them already, you may find them here.
if
condition to start a conditional statement, elif
condition to provide additional tests, and else
to provide a default.==
to test for equality.X and Y
is only true if both X
and Y
are True
.X or Y
is true if either X
or Y
, or both, are True
.True
and False
represent truth values.