Chapter 1 of 10: Before the lecture
Bell shows why list indexing and dictionary lookup run in constant time, then simulates dice rolls and a filling pool.
Python list access runs in constant time because a list stores references to its elements in one contiguous block of memory. Bell then builds the hash table behind dictionaries, explains collisions, and shows why mutable objects such as lists cannot serve as keys. The second half turns to stochastic simulation, where repeated random trials estimate the probability of each die face and of repeated outcomes over several rolls. A last simulation estimates how long a pool takes to fill when the water flow varies. The final session of MIT's introductory Python course closes with a review and pointers to 6.100B, 6.101 and 6.102.
Python list access runs in constant time because a list stores references to its elements in one contiguous block of memory. Bell then builds the hash table behind dictionaries, explains collisions, and shows why mutable objects such as lists cannot serve as keys. The second half turns to stochastic simulation, where repeated random trials estimate the probability of each die face and of repeated outcomes over several rolls. A last simulation estimates how long a pool takes to fill when the water flow varies. The final session of MIT's introductory Python course closes with a review and pointers to 6.100B, 6.101 and 6.102.

This lecture
Lecture 25 of 25 of Introduction to Computer Science and Programming using Python.
Choose a node to see how it connects to this lecture. What comes before is on the leftat the top. What comes after is on the rightat the bottom. The ring is what it teaches. People and places are above.
Press a chosen node again to open it.
Your comment is kept while you sign up.Sign in