Conditional Execution & Boolean Logic
In this lesson, we’re going to go over conditional logic, which will allow you to write programs that have different outcomes depending on the data, events, and/or user interactions that take place as your program executes. This is often referred to as your program’s “state.” Specifically, we’ll cover: (a) if, if/else, if/elif…/else statements, (b) comparison operators, (c) truth tables, and (d) scenarios where you might want to use if/elif/else statements.
Please Complete the Following Tasks
1. Download the Exercise Files
Exercise Files2. Review the Slides
3. Watch the Lecture Video(s)
Link | Title | Type | Duration |
---|---|---|---|
Video 1 | Intro to conditionals | pre-recorded | 9:20 |
Video 2 | If and else | pre-recorded | 15:03 |
Video 3 | Elif | pre-recorded | 11:06 |
Video 4 | Logical operators and Truth Tables | pre-recorded | 22:49 |
Video 5 | Practice with conditional statements | lecture | 1:35:16 |
4. Review / Study the Supplemental Materials
Note: these readings / videos are suggested for additional context / examples, but not required.
-
Severance
Ch3: Conditionals.
reading • video - Ch5: Conditionals. ThinkCS