Difference between revisions of "Code Snippet: Random Fractions"
From Coder Merlin
(→Python) |
|||
Line 6: | Line 6: | ||
let fraction = Float.random(in: 0 ..< 1) | let fraction = Float.random(in: 0 ..< 1) | ||
print(fraction) | print(fraction) | ||
</syntaxhighlight> | |||
== Java == | |||
<syntaxhighlight lang="java"> | |||
// Import the random class in java.util | |||
Random random = new Random(); | |||
</syntaxhighlight> | </syntaxhighlight> | ||
Latest revision as of 09:31, 19 September 2019
Within these castle walls be forged Mavens of Computer Science ...
— Merlin, The Coder