Question: Write a function that will play Rock, Paper, Scissors (RPS) with the values (list) passed from the player. For each player's choice, the function will

Write a function that will play Rock, Paper, Scissors (RPS) with the values (list) passed from the player. For each player's choice, the function will pick a random choice (rock, paper, scissors) and then compare it with the player's value to determine if the player won, lost, or drew. The result should be stored in one dictionary that contains all information for any player who calls the function. The list is rps=['rock', 'paper', 'scissors'] In the main, create two lists representing 10 choices for each player. The choices are random. Then create two threads, each with the player's name as the thread name, and pass the player's list to the RPS function. Finally, print the content of the dictionary. Sample output: \{'Yasmeen': \{'win': 5, 'lose': 2, 'draw': 3\}, 'Eman': { 'win': 4, 'lose': 4, 'draw': 2} You must use the random module and the random.choice(LISTNAME) to pick a random element from a list. It would be best if you used a global dictionary
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
