Need code that asks for four names and splits them into two teams, randomly. | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
0

Need code that asks for four names and splits them into two teams, randomly.

been trying to do it but can't figure it out. (Need to know what to use to pick the names randomly, I can figure out the rest)

1st Nov 2016, 7:49 PM
Angel
2 Answers
+ 1
I can write the whole code but you are here to learn coding and I will help you to learn so: first ask for the name system out system in easy. second this small line of code might be helpful good luck . ^_^ import java.util.concurrent.ThreadLocalRandom; // nextInt is normally exclusive of the top value, // so add 1 to make it inclusive ThreadLocalRandom.current().nextInt(min, max + 1);
1st Nov 2016, 8:06 PM
imaqtpie
imaqtpie - avatar
- 1
Try in python you will end up with less code. All the best.
15th Nov 2016, 5:56 AM
SYED MOHAMMAD REHAN
SYED MOHAMMAD REHAN - avatar