Lesson 11: Telling the truth
Outline:
- Recap Lesson 10
- example: max of three
- Logical operators
and
,or
,not
- truth tables
- Exercises 1-3
- Conditional loops
while
loops- Exercise 4
- translating between
for
loops andwhile
loops
Explore after class:
- More practice with
while
loops: Exercises 5+6
Want more practice?
- Runestone:
if
statement exercises- reading: Nested
if
statements - reading:
if
-elif
-else
- reading: Accumulator pattern with
if
- reading: Planning code with conditionals
- reading:
while
loops
- Codingbat:
if
-else
- more examples with booleans
- others mixing
if
with strings/lists: count_hi, cat_dog, common_end, array_count9, string_match
Reading assignment (to be completed by the next class):
- Zelle sections 8.1-8.7 (pp. 243-276)