vendredi 5 juin 2020

Random Number Generator in a range [duplicate]

I'm stuck on an assignment. For part of this assignment, I have been given a text file with a list of 100 names. I am supposed to write some code that randomly generates a number between 1 and 100. The generated number corresponds to a name on the list. I am then supposed to make a small game in which the opponent is the randomly generated name. I am having some issues making a random number generator, as well as then picking one name off a list with that number. I've included what I have so far below. Any help us appreciated. Thanks!

enter image description here




Aucun commentaire:

Enregistrer un commentaire