In this question, you are going to write a function that determines the result of a game of stone, paper, scissors given the choices of player 1 and player 2. In particular, write an rps_winner ()...


 In this question, you are going to write a function that determines the result of a game of stone, paper, scissors given the choices of player 1 and player 2. In particular, write an rps_winner () function that prompts the user to choose player 1 then the choice of player 2, then it displays the result for player 1 as indicated in the examples given in section 2. You can assume that the user will only enter words: rock, paper or scissors in lowercase. Remember that paper beats stone, let the stone beat the scissors and the scissors beat the paper. If both players do the same choice, we have a draw.




>>> # testing Question 7<br>>>><br>>>> rps_winner()<br>What choice did player 1 make?<br>Type one of the following options: rock, paper, scissors: rock<br>What choice did player 2 make?<br>Type one of the following options: rock, paper, scissors: paper<br>Player 1 wins. That is False<br>It is a tie. That is not True<br>>>> rps_winner()<br>What choice did player 1 make?<br>Type one of the following options: rock, paper, scissors: paper<br>What choice did player 2 make?<br>Type one of the following options: rock, paper, scissors: rock<br>Player 1 wins. That is True<br>It is a tie. That is not True<br>>>> rps_winner()<br>What choice did player 1 make?<br>Type one of the following options: rock, paper, scissors: scissors<br>What choice did player 2 make?<br>Type one of the following options: rock, paper, scissors: paper<br>Player 1 wins. That is True<br>It is a tie. That is not True<br>>>> rps_winner()<br>What choice did player 1 make?<br>Type one of the following options: rock, paper, scissors: paper<br>What choice did player 2 make?<br>Type one of the following options: rock, paper, scissors: paper<br>Player 1 wins. That is False<br>It is a tie. That is not False<br>>>><br>

Extracted text: >>> # testing Question 7 >>> >>> rps_winner() What choice did player 1 make? Type one of the following options: rock, paper, scissors: rock What choice did player 2 make? Type one of the following options: rock, paper, scissors: paper Player 1 wins. That is False It is a tie. That is not True >>> rps_winner() What choice did player 1 make? Type one of the following options: rock, paper, scissors: paper What choice did player 2 make? Type one of the following options: rock, paper, scissors: rock Player 1 wins. That is True It is a tie. That is not True >>> rps_winner() What choice did player 1 make? Type one of the following options: rock, paper, scissors: scissors What choice did player 2 make? Type one of the following options: rock, paper, scissors: paper Player 1 wins. That is True It is a tie. That is not True >>> rps_winner() What choice did player 1 make? Type one of the following options: rock, paper, scissors: paper What choice did player 2 make? Type one of the following options: rock, paper, scissors: paper Player 1 wins. That is False It is a tie. That is not False >>>

Jun 11, 2022
SOLUTION.PDF

Get Answer To This Question

Related Questions & Answers

More Questions »

Submit New Assignment

Copy and Paste Your Assignment Here