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

Random numbers generating algorithm

can someone tell me how random numbers are generated in google if you ask for it and how the coding is done for it?

28th Oct 2018, 10:24 AM
Prateek
Prateek - avatar
4 Answers
+ 2
Prateek Bhat actually rn are pseudo generated by special math formulas which are not completely random. well some of possible solutions just take parameters of a noise or sthg like generate sequence of random which are much more random. as example you might check uuid npm library alhoritms to generate unic id’s
28th Oct 2018, 10:33 PM
Sergei No
Sergei No - avatar
+ 2
and if you want full numbers than use Math.floor(Math.random)
29th Oct 2018, 3:59 PM
Chaostrottel_HD Auf DuTube
Chaostrottel_HD Auf DuTube - avatar
+ 1
you can do this with javascript using the. random maths object
29th Oct 2018, 4:13 AM
Webster
Webster - avatar
0
In Python it's very simple, Import random Number = random.randint(a range seperated by a comma) Print(Number)
28th Oct 2018, 10:25 AM
PureLogicality
PureLogicality - avatar