Random numbers | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
0

Random numbers

I know a computer can't roll a dice everytime it is asked to generate a random number, so how do they do that?

14th Apr 2019, 7:01 PM
oh Common
oh Common - avatar
4 Answers
+ 3
There exists algorithms to create a pseudorandom number. Real randomness is not possible but you can simulate it. https://en.m.wikipedia.org/wiki/Pseudorandom_number_generator
14th Apr 2019, 7:39 PM
Denise Roßberg
Denise Roßberg - avatar
+ 2
https://www.howtogeek.com/183051/htg-explains-how-computers-generate-random-numbers/amp/
14th Apr 2019, 7:43 PM
Dlite
Dlite - avatar
+ 1
Thank you! Denise Roßberg
15th Apr 2019, 2:29 AM
oh Common
oh Common - avatar
+ 1
Thank you! D'Lite
15th Apr 2019, 2:29 AM
oh Common
oh Common - avatar