Date: June 30
Today we’ll add two tools to our ever-expanding toolbox: the conditional expression and the local expression.
Conditionals allow to ask “questions” in our programs and then do certain things if the answer is yes…or a totally different thing if the answer is no.
Meanwhile, nearly every language has a way of defining local variables to hold intermediate values. It’s another bread-and-butter programming thing. Unfortunately, the local expression is one of the uglier features of ISL because it isn’t considered a super “functional” special form. Most languages, including actual Racket, have much less verbose ways of defining local variables.
Speaking of special forms, let’s revisit that! Why you ask? Because BOTH of these tools will involve new special forms and therefore changes to our rules of computation which instead of relegating to the slides we’ll keep updating here.
In-Class Resources
| Link | Title | Type | Duration |
|---|---|---|---|
| Video 1 | Lecture 6.1 - Booleans and Conditionals | pre-recorded | 8:15 |
| Video 2 | Lecture 6.2 - Built-in Tests | pre-recorded | 6:33 |
| Video 3 | Lecture 6.3 - DrRacket Shenanigans | pre-recorded | 6:12 |
| Video 4 | Lecture 6.4 - Iferation | pre-recorded | 7:42 |
| Video 5 | Lecture 6.5 - The Local Expression | pre-recorded | 3:37 |
| Video 6 | Lecture 6.6 - Feeling lost? | pre-recorded | 3:31 |
Mini-Quiz 6: Conditionals and Quiz Practice
To take the mini-quiz associated with this lecture's content, you can use this link or find the quiz under the Quizzes page on Canvas.