mardi 11 août 2020

I am trying to do get a list of random numbers which I want to not be repeated

I have a arraylist of names which get added 1 by 1. The range of the random number is the amount of people inside the arraylist.

For example: NameList => [James, Vince, Joe, Joseph, John]

i want the output to be

NameListNum => [James 3, Vince 2, Joe 5, Joseph 1, John 4]

or

NameListNum => [James 2, Vince 5, Joe 1, Joseph 4, John 3]




Aucun commentaire:

Enregistrer un commentaire