Previous Lecture | Lecture 10 | Next Lecture |
Lecture 10, Wed 08/29
dicts
Code from class
https://github.com/ucsb-cs8-m18/code-from-class/tree/master/08-29
iClicker Questions
0. What is the decimal number 123 in octal?
(a) 7B
(b) 173
(c) 1111011
(d) 234
(e) None of the above
Topics
- dictionaries - key/value
- nested dicts! (student id to {name:…, major:…})
- count # of each word in Shakespeare
- ASCII, Unicode - ord, chr (lexicographic ordering on p. 185)
- random maze (with Unicode slash characters / and \)
- line that bounces from left to right in the terminal