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.
Learn simulation techniques using random-number generation.
Pack values into a tuple and unpack values from a tuple.
Return multiple values from a function via a tuple.
Understand how an identifier’s scope determines where in your program you can use it.
Create functions with default parameter values.
Call functions with keyword arguments.
Create functions that can receive any number of arguments.
Use methods of an object.