How to print random number from 1 to 10 without any module ? | Sololearn: Learn to code for FREE!
Neuer Kurs! Jeder Programmierer sollte generative KI lernen!
Kostenlose Lektion ausprobieren
+ 1

How to print random number from 1 to 10 without any module ?

before some days I wrote some code for that but now I forget it I used something set and dictionary for that please somebody help me to write it again..

30th Oct 2022, 3:58 PM
Ratnapal Shende
Ratnapal Shende - avatar
1 Antwort
+ 3
There are some ideas here. https://stackoverflow.com/questions/22950768/random-int-without-importing-random I think dict and set may not work for this, because they store and retrieve values in the order that they were added. In earlier Python versions the access was really random.
30th Oct 2022, 6:17 PM
Tibor Santa
Tibor Santa - avatar