ChEn263 — Lecture 5
Lecture 5 - Conditionals
- This lectures discusses conditional statments including:
ifstatements,if-elsestatements, andif-elifstatements. 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,countifandsumiffunctions.
-
This video gives examples showing the use of
if-statements,if-elsestatements, andif-elif-elsestatements 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.
Additional Reading
- Python Numerical Methods – Branching Statements
