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 books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.