COMPSCI 61A Lecture Notes - Lecture 11: Floating Points, Floating Point
zogo39484755 and 6 others unlocked
22
COMPSCI 61A Full Course Notes
Verified Note
22 documents
Document Summary
A method for combining data value satisfies the closure property if: The result of combination can itself be combined using the same method. Closure is powerful because it permits us to create hierarchical structures. Hierarchical structures are made up of parts, which themselves are made up of part, and so on. Lists are represented as a row of index-labeled adjacent boxes, one per element. Each box either contains a primitive value or points to a compound value. Slicing list[a:b] returns a list of the values in list from a inclusive to b exclusive. Slicing creates new values, ergo it creates a new list. Several built-in functions that take iterable arguments and aggregates them into a value sum(iterable, start) -> value. Returns the sum of an iterable of numbers plus the value of parameter start, which defaults to 0/ when the iterable is empty, return start max(iterable, key=func) / max(a, b, c, d, , key=func) -> value.