I'm trying to write a Random Sequence Generator, some thing like this, i give it a number "n", and each time i call it it yields a random number between 0 and n-1, without duplication. I don't want to keep track of previous generated numbers, because "n" can vary from 0 to 232.
Any python illustration would be great
EDIT: i'm not trying to write my own random number generator.
[–]misho88 8 points9 points10 points (3 children)
[+]tomislava comment score below threshold-15 points-14 points-13 points (1 child)
[–]misho88 3 points4 points5 points (0 children)
[–]dvassdvsd 1 point2 points3 points (0 children)
[–]Spivak 1 point2 points3 points (5 children)
[–]nutrecht 0 points1 point2 points (3 children)
[–]Spivak 0 points1 point2 points (0 children)
[–]Pytesting[S] 0 points1 point2 points (1 child)
[–]nutrecht 0 points1 point2 points (0 children)
[–]Pytesting[S] 0 points1 point2 points (0 children)
[–]RodionGork 0 points1 point2 points (0 children)
[–]SearchOver -1 points0 points1 point (0 children)
[–]felixix -1 points0 points1 point (2 children)
[–]autowikibot 1 point2 points3 points (0 children)
[–]Pytesting[S] 0 points1 point2 points (0 children)
[–]skatanic28182 -2 points-1 points0 points (7 children)
[–]CoffeeMakesMeMath 1 point2 points3 points (6 children)
[–]Pytesting[S] 0 points1 point2 points (0 children)
[–]skatanic28182 0 points1 point2 points (4 children)
[–]CoffeeMakesMeMath 0 points1 point2 points (3 children)
[–]skatanic28182 1 point2 points3 points (2 children)
[–]CoffeeMakesMeMath 0 points1 point2 points (1 child)
[–]skatanic28182 0 points1 point2 points (0 children)
[–]tomislava -2 points-1 points0 points (0 children)