Tag Archives: mathematics
Monty Hall Sneak Peak
Coming Soon: Monty Hall game player in Python. For now, here is a little teaser: The 10 billion iteration answer: >>> monty_hall.play(iter=10000000000) Ran 10000000000 iterations in 104833.082781s {‘wins’: 3333340564L, ‘losses’: 6666659436L} The code is hosted, of course, on GitHub and … Continue reading
Posted in Programming, Python
Tagged decorators, github, mathematics, monty hall paradox, object-oriented programming, programming, python
Comments Off
Happy Pi Day!
A quick post in celebration of Pi Day (March 14th, of course). Here is a piece of sample code for slowly deriving pi using Machin’s approach. I say slow because it takes quite a while to approach pi. Using the … Continue reading
