ChEn263 — Lecture 5
Lecture 5 - Conditionals
- This lectures discusses conditional statments including:
if
statements,if
-else
statements, andif
-elif
statements. I also discuss conditional operators, comparison operators, relevant keywords for logical operations, and some basic concepts of Boolean logic and Truth Tables.
Examples
- This video gives examples showing the use of conditionals in Excel including
if
,countif
andsumif
functions.
-
This video gives examples showing the use of
if
-statements,if
-else
statements, andif
-elif
-else
statements in Python. It also shows some examples of Boolean logic and comparison operators.
- Example 1 - Conditionals in Python. This is the Python code that accompanies the video
- Example 2 - Conditionals in Python, Key. This is another example showing the use of conditional operations in Python. This example is meant for extra practice.