06.09.2021 Views

How to Think Like a Computer Scientist - Learning with Python, 2008a

How to Think Like a Computer Scientist - Learning with Python, 2008a

How to Think Like a Computer Scientist - Learning with Python, 2008a

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

9.9 Glossary 105<br />

9.9 Glossary<br />

Assign-<br />

immutable type: A type in which the elements cannot be modified.<br />

ments <strong>to</strong> elements or slices of immutable types cause an error.<br />

mutable type: A data type in which the elements can be modified. All mutable<br />

types are compound types. Lists and dictionaries are mutable data types;<br />

strings and tuples are not.<br />

tuple: A sequence type that is similar <strong>to</strong> a list except that it is immutable.<br />

Tuples can be used wherever an immutable type is required, such as a key<br />

in a dictionary.<br />

tuple assignment: An assignment <strong>to</strong> all of the elements in a tuple using a single<br />

assignment statement. Tuple assignment occurs in parallel rather than in<br />

sequence, making it useful for swapping values.<br />

deterministic: A program that does the same thing each time it is called.<br />

pseudorandom: A sequence of numbers that appear <strong>to</strong> be random but that are<br />

actually the result of a deterministic computation.<br />

his<strong>to</strong>gram: A list of integers in which each element counts the number of times<br />

something happens.<br />

pattern matching: A program development plan that involves identifying a familiar<br />

computational pattern and copying the solution <strong>to</strong> a similar problem.

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!