Question: 1. Write a function that will play Rock, Paper, Scissors (RPS) with the value passed from the player. The function will pick random elements from

 1. Write a function that will play Rock, Paper, Scissors (RPS)

1. Write a function that will play Rock, Paper, Scissors (RPS) with the value passed from the player. The function will pick random elements from a list. Then the function must know if passed value from the player element won, lost or draw. The list is rps=['rock', 'paper', 'scissors'] Then the function must add to a dictionary the number of times the first element lose per option in the list. in the main create two lists representing 10 choices for each player, the choices are random. Then create two threads each with the name of the player and pass 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 need to use the random module and the random.choice(LISTNAME) to pick a random element from a list. You must use global dictionary

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!