Browse Source

Random

pull/140/head
Jure Šorn 1 year ago
parent
commit
6a1ab6abea
2 changed files with 2 additions and 2 deletions
  1. 2
      README.md
  2. 2
      index.html

2
README.md

@ -518,7 +518,7 @@ from statistics import mean, median, variance # Also: stdev, quantiles, grou
### Random
```python
from random import random, randint, choice # Also shuffle, gauss, triangular, seed.
from random import random, randint, choice # Also: shuffle, gauss, triangular, seed.
<float> = random() # A float inside [0, 1).
<int> = randint(from_inc, to_inc) # An int inside [from_inc, to_inc].
<el> = choice(<sequence>) # Keeps the sequence intact.

2
index.html

@ -470,7 +470,7 @@ Point(x=<span class="hljs-number">1</span>, y=<span class="hljs-number">2</span>
<div><h3 id="statistics">Statistics</h3><pre><code class="python language-python hljs"><span class="hljs-keyword">from</span> statistics <span class="hljs-keyword">import</span> mean, median, variance <span class="hljs-comment"># Also: stdev, quantiles, groupby.</span>
</code></pre></div>
<div><h3 id="random">Random</h3><pre><code class="python language-python hljs"><span class="hljs-keyword">from</span> random <span class="hljs-keyword">import</span> random, randint, choice <span class="hljs-comment"># Also shuffle, gauss, triangular, seed.</span>
<div><h3 id="random">Random</h3><pre><code class="python language-python hljs"><span class="hljs-keyword">from</span> random <span class="hljs-keyword">import</span> random, randint, choice <span class="hljs-comment"># Also: shuffle, gauss, triangular, seed.</span>
&lt;float&gt; = random() <span class="hljs-comment"># A float inside [0, 1).</span>
&lt;int&gt; = randint(from_inc, to_inc) <span class="hljs-comment"># An int inside [from_inc, to_inc].</span>
&lt;el&gt; = choice(&lt;sequence&gt;) <span class="hljs-comment"># Keeps the sequence intact.</span>

Loading…
Cancel
Save