+ 1

How can i make a shuffler without using modules or built in functions

What i have to keep in mind if I want to shuffle an array . What are the different techniques of shuffling and how to choose between them

10th Jul 2020, 12:09 PM
‎يوسف سعد‎
‎يوسف سعد‎ - avatar
3 Antworten
+ 5
If you aren't even supposed to use random module, you'd have to implement your own pseudo random number generator. Sounds like quite a project. https://en.m.wikipedia.org/wiki/Pseudorandom_number_generator
10th Jul 2020, 1:57 PM
HonFu
HonFu - avatar
+ 2
i would think recursion and indexing. mabey even a loop and indexing. Only way to find out is to start coding! And is this just to learn? Whats so bad about: import random as r a = [1,2,3,4] print(r.shuffle(a))
10th Jul 2020, 12:19 PM
Slick
Slick - avatar
+ 1
Thank you all
10th Jul 2020, 2:31 PM
‎يوسف سعد‎
‎يوسف سعد‎ - avatar