Previous Lecture | Lecture 9 | Next Lecture |
Lecture 9, Tue 08/29
Accumulatator Pattern
-
A conversation about notes sheets.
-
Practicing
Look at https://codingbat.com (the Python tab)
Accumulator pattern
Code: https://github.com/ucsb-cs8-m17/Lecture9_0829
- Accumulating a sum
- Accumulating a product
- Accumulating a list (e.g. filtering a list, or forming a list of all prime numbers, or all divisors of a number)
- Accmulating a dictionary