4. Functions
Objectives
In this chapter, you’ll
Create custom functions.
Import and use Python Standard Library modules, such as
random
and math
, to reuse code and avoid “reinventing the wheel.”
Pass data between functions.
Generate a range of random numbers.
See simulation techniques using random-number generation.
Seed the random number generator ...
Get Python for Programmers now with the O’Reilly learning platform.
O’Reilly members experience live online training, plus books, videos, and digital content from nearly 200 publishers.