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
whileloops- Exercise 4
- translating between
forloops andwhileloops
Explore after class:
- More practice with
whileloops: Exercises 5+6
Want more practice?
- Runestone:
ifstatement exercises- reading: Nested
ifstatements - reading:
if-elif-else - reading: Accumulator pattern with
if - reading: Planning code with conditionals
- reading:
whileloops
- Codingbat:
if-else- more examples with booleans
- others mixing
ifwith 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)