O'Reilly logo

Python for Programmers, First Edition by Harvey Deitel, Paul Deitel, Paul J. Deitel

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

4. Functions

Objectives

In this chapter, you’ll

Image Create custom functions.

Image Import and use Python Standard Library modules, such as random and math, to reuse code and avoid “reinventing the wheel.”

Image Pass data between functions.

Image Generate a range of random numbers.

See simulation techniques using random-number generation.

Seed the random number generator ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required