LynuxDev.net: Python, Random Numbers, and Monte Carlo Simulation | Linux Today

LynuxDev.net: Python, Random Numbers, and Monte Carlo Simulation

Written By
Web Webster
Web Webster
Jul 1, 2000

[ Thanks to BeOpen
for this link. ]

“As Python becomes more widely accepted and the Python community
broadens, it becomes more difficult for one side of the community
to see what the other is doing. In response to one comment we
received about Python only being useful as a web programming
language, we decided it was time to write about the Python random
number module, and use it for a couple of simple Monte Carlo
simulations.”

“When you import the random module, Python uses a Wichmann-Hill
pseudo-random number generator. All computer random number
generators are generally pseudo-random number generators, because
software programs can only generate nearly random sequences. Since
this is an article on Python, not on random number generation, we
won’t go further into the topic, except to say that the
Wichmann-Hill algorithm is thought to be pretty good.”

“So what, then, can you do with a random number generator? One
of the more useful applications of random numbers in scientific
computing is something called Monte Carlo simulation. The name
refers to the gambling city, and denotes that the technique is
based upon random processes, such as dice rolls.”

Complete
Story

Web Webster

Web Webster

Web Webster has more than 20 years of writing and editorial experience in the tech sector. He’s written and edited news, demand generation, user-focused, and thought leadership content for business software solutions, consumer tech, and Linux Today, he edits and writes for a portfolio of tech industry news and analysis websites including webopedia.com, and DatabaseJournal.com.

Linux Today Logo

LinuxToday is a trusted, contributor-driven news resource supporting all types of Linux users. Our thriving international community engages with us through social media and frequent content contributions aimed at solving problems ranging from personal computing to enterprise-level IT operations. LinuxToday serves as a home for a community that struggles to find comparable information elsewhere on the web.

Property of TechnologyAdvice. © 2026 TechnologyAdvice. All Rights Reserved

Advertiser Disclosure: Some of the products that appear on this site are from companies from which TechnologyAdvice receives compensation. This compensation may impact how and where products appear on this site including, for example, the order in which they appear. TechnologyAdvice does not include all companies or all types of products available in the marketplace.