Question: Question 1 PYTHON PROGRAMMING, PYTHON 3. NO IF AND ELSE STATEMENTS?LOOPS. In this question you will write a function that determines the result of a

Question 1

PYTHON PROGRAMMING, PYTHON 3. NO IF AND ELSE STATEMENTS?LOOPS.

In this question you will write a function that determines the result of a rock, paper, scissors game given choices of player 1 and player 2. In particular, write a function rps_winner() that prompts the user for choice of player 1 and then choice of player 2, and then it displays the result for player 1 as indicated in the examples given in Section 2. You may assume that the user will only enter words: rock, paper or scissors in lower case. Recall that paper beats rock, that rock beats scissors and that scissors beat paper. If both players make the same choice, we have a draw.

####Testing question 2:

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 >>>

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!