2.3 More About the math Module

Many mathematical helper functions are available in the math module. How do we know which methods or functions are available? Fortunately, Python has a built-in help subsystem that allows you to see the documentation for a particular module or function. To use this help, simply give the command help("modulename"), where the module name is the module you are interested in. Alternatively, if you know the name of a function and you want to know how to call that function, you can use the command help("modulename.functionname"). For example, Session 2.1 shows the result of asking for help on the math module. You might find it interesting that in addition to typical math functions, the math module contains several ...

Get Python Programming in Context, 3rd Edition 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.