推荐学习书目
› Learn Python the Hard Way
Python Sites
› PyPI - Python Package Index
› http://diveintopython.org/toc/index.html
› Pocoo
值得关注的项目
› PyPy
› Celery
› Jinja2
› Read the Docs
› gevent
› pyenv
› virtualenv
› Stackless Python
› Beautiful Soup
› 结巴中文分词
› Green Unicorn
› Sentry
› Shovel
› Pyflakes
› pytest
Python 编程
› pep8 Checker
Styles
› PEP 8
› Google Python Style Guide
› Code Style from The Hitchhiker's Guide
Livid
400.16D
567.53D
V2EX  ›  Python

对 random.randrange 的一个试验

  •  
  •   Livid ·
    PRO
    · Dec 6, 2013 · 4511 views
    This topic created in 4701 days ago, the information mentioned may be changed or developed.

    运行结果:

    1: 9.99375%
    2: 10.00486%
    3: 10.01411%
    4: 9.99314%
    5: 9.98705%
    6: 10.00872%
    7: 9.99246%
    8: 10.00895%
    9: 9.99675%
    10: 10.00021%
    4 replies  •  1970-01-01 08:00:00 +08:00
    sethverlo
        1
    sethverlo  
       Dec 6, 2013
    1000w 样本不算大啊……
    tioover
        2
    tioover  
       Dec 6, 2013
    主要看分布,记得有文章将随即函数分布弄成图片,可以很明显看出真随即和伪随机
    allenforrest
        3
    allenforrest  
       Dec 6, 2013
    相当相当的不错了。
    RTNelo
        4
    RTNelo  
       Dec 7, 2013
    为何不用 collections.Counter ?
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Privacy   ·   Solana   ·   3587 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 39ms · UTC 04:28 · PVG 12:28 · LAX 21:28 · JFK 00:28
    ♥ Do have faith in what you're doing.