The built-in modules that come in handy for the programmer (in his tasks) form the focus of this chapter. Random numbers, random sequences, and related operations are dealt with. Similarly the commonly used distribution functions and related constructs are explained. Use of array for number representations and its manipulations is efficient in terms of storage and execution. The bisect module with its operations complement this as well as string related work. When the focus of operation is on an extremum element of any sequence, heapq with its methods is fast in execution; explanation of its operation and tracking movement of elements when the heap is popped or pushed aids in effective grasp of heapq. The interesting exercises at the end of the chapter complement those on sequences in Chaps. 5 and 6.
KeywordsRandom Number Small Element Mutable Sequence Pseudo Random Generator Float Point Number
- Guttag JV (2013) Introduction to computation and programming using Python. MIT PressGoogle Scholar
- Kreyszig E (2006) Advanced engineering mathematics, 9th edn. Wiley, New JerseyGoogle Scholar
- Krishnan V (2006) Probability and random processes. Wiley, New JerseyGoogle Scholar
- van Rossum G, Drake FL Jr (2014) The Python library reference. Python Software FoundationGoogle Scholar
- Zwillinger D (ed) (2003) Standard mathematical tables and formulae. Chapman & Hall/CRC, New YorkGoogle Scholar