APPENDIX B

Python library reference

THE following tables provide a convenient reference for the most common Python functions and methods used in this book. You can find a complete reference for the Python standard library at https://docs.python.org/3/library/.

B.1 MATH MODULE

The following table lists commonly used functions and constants in the math module. The variable name x represents a generic numerical argument. Arguments in square brackets are optional.

B.2 TURTLE METHODS

The following table lists commonly used methods of the Turtle class (in the turtle module). The following descriptions assume default settings: angles are in degrees and right turns are clockwise. Arguments in square brackets are optional.

B.3 SCREEN METHODS

The following table lists commonly used methods of the Screen class (in the turtle module). Arguments in square brackets are optional.

B.4 MATPLOTLIB.PYPLOT MODULE

The following table lists commonly used functions in the matplotlib.pyplot module. The parameters in square brackets are optional. For a complete reference, see http://matplotlib.org/api/pyplot_summary.html.

B.5 RANDOM MODULE

The following table lists commonly used functions in the random module.

B.6 STRING METHODS

The following table lists commonly used methods of the str class. Optional parameters are denoted in square brackets.

B.7 LIST METHODS

The following table lists commonly used methods of the list class and three list functions from the random module. Optional parameters are in square brackets.

B.8 IMAGE MODULE

The module image.py which contains the Image class is available on the book web site. The first table lists the functions in the image module.

B.9 SPECIAL METHODS

The following table lists commonly used special methods that may be overridden in new classes.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
18.227.26.217