+ 1

How to make multiple different random numbers

https://code.sololearn.com/c7ff1Tmc16HT/?ref=app I am trying to set it up so that it generates 6 different random number but they are all the same, any idea how to help would be appreciated.

19th Nov 2018, 12:56 AM
Ethan Combs
Ethan Combs - avatar
2 Réponses
+ 1
As you're only setting the value of the variable Score to be a random integer once, the value is always going to stay the same every time you use that variable. You would need to redefine it to be equal to a new random integer every single time you would need to use it again.
19th Nov 2018, 1:06 AM
Faisal
Faisal - avatar
+ 1
Thank you so much, I was afraid of that
19th Nov 2018, 1:09 AM
Ethan Combs
Ethan Combs - avatar