Skip to content

[Module] add random module - #268

Open
khchen wants to merge 3 commits into
ThakeeNathees:masterfrom
khchen:random
Open

[Module] add random module#268
khchen wants to merge 3 commits into
ThakeeNathees:masterfrom
khchen:random

Conversation

@khchen

@khchen khchen commented Jun 26, 2022

Copy link
Copy Markdown

Base on splitmix64, a fast but non-cryptographic PRNG.

Example:

from random import rand, sample, shuffle

isInteger = true
print(rand(100, isInteger))
print(rand(50..100, isInteger))
print(rand(50..100, isInteger))
print(sample([1, 2, 3, 4, 5]))
print(shuffle([1, 2, 3, 4, 5]))

@khchen khchen changed the title Add random module. [Module] add random module Jul 18, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant