September 2017
Beginner
402 pages
9h 52m
English
The rand method returns a random number between zero and the given value. Notice that this method is inherited from the Real role (refer to the diagram at the beginning of the Using simple built-in data types section), and the return value is a floating-point number:
say 100.rand;
Running this code a few times results in different values being printed, as you can see here:
70.153094242997857.215025602605713.754287797535394.6395293813437
Read now
Unlock full access