subject

#In the game Rock-Paper-Scissors, two opponents#simultaneously choose to throw either "Rock", "Paper",#or "Scissors". Rock beats Scissors, Scissors beats Paper,#and Paper beats Rock. If both players throw the same#object, the round is a tie.##Write a function called find_winner. find_winner will take#as input a list of 2-tuples, each representing a round of#Rock-Paper-Scissors. Each 2-tuple will contain two strings.#Each string will be either "Rock", "Paper", or "Scissors".#The first item in the 2-tuple will represent what Player 1#chooses in each round, and the second item in the 2-tuple#will represent what Player 2 chooses in each round.##find_winner should return the string "Player 1 wins!" if#Player 1 wins more games than Player 2. It should return the#string "Player 2 wins!" if Player 2 wins more games than#Player 1. It should return the string "It's a tie!" if the#two players win an equal number of times.##The number of times the two players tie is irrelevant to the#result: all that matters is who wins more rounds than the#other.##For example:## find_winner([("Rock", "Rock"), ("Rock", "Scissors"),# ("Paper", "Rock"), ("Scissors", "Rock")])##...would return "Player 1 wins!" because Player 1 wins#two round and Player 2 wins one round.

ansver
Answers: 1

Other questions on the subject: Computers and Technology

image
Computers and Technology, 21.06.2019 19:00, devila321
When keyboarding, if you want to be fast and accurate you should return your hands on home row with your fingers relaxed and your eyes on the text use only your index fingers to hunt and peck keep your fingers stiff and your eyes on the keys slouch in your chair and keep your fingers hovering over all of the keys
Answers: 2
image
Computers and Technology, 23.06.2019 03:50, nakeytrag
Iam a bacterium. i cause stomach cramps and diarrhea. i am caused by eating rotten foodssuch as chicken, fish, or eggs. sometimes turtles carry my bacteria. what am i?
Answers: 2
image
Computers and Technology, 23.06.2019 06:30, scoutbuffy2512
On early television stations, what typically filled the screen from around 11pm until 6am? test dummies test patterns tests testing colors
Answers: 1
image
Computers and Technology, 23.06.2019 15:00, lopez7512
What is the total resistance in a circuit that contains three 60 ohm resistors connected in a series? a. 20 ohms b. 120 ohms c. 60 ohms d. 180 ohms
Answers: 2
You know the right answer?
#In the game Rock-Paper-Scissors, two opponents#simultaneously choose to throw either "Rock", "Paper...

Questions in other subjects:

Konu
History, 30.11.2020 20:30
Konu
Mathematics, 30.11.2020 20:30