Anonymous user
Seven-sided dice from five-sided dice: Difference between revisions
Seven-sided dice from five-sided dice (view source)
Revision as of 01:24, 19 May 2014
, 10 years ago→{{header|Julia}}: fixed dice7() to ensure uniform distribution of results; added histogram checks
(→{{header|Julia}}: Marked incomplete as missing check for at least 1000000) |
(→{{header|Julia}}: fixed dice7() to ensure uniform distribution of results; added histogram checks) |
||
Line 960:
=={{header|Julia}}==
<lang Julia>dice5() = rand(1:5)
function dice7()
r < 21 ?
{{Out}}
<pre>julia>
(0:1:5,[199932,200431,199969,199925,199743])
julia>
(0:1:7,[142390,143032,142837,142999,142800,142642,143300])</pre>
=={{header|Lua}}==
|