Question: rps ( Exercise 5 . 2 6 from the textbook ) Write a function rps that returns the result of a game of Rock, Paper,

rps
(Exercise 5.26 from the textbook) Write a function rps that returns the result of a game of "Rock,
Paper, Scissors". The function accepts two arguments, each one of 'R','P','S', that represents
the symbol played by each of the two players. The function returns:
-1 if the first player wins
0 if a tie
1 if the second player wins
Scissors beats Paper beats Rock beats Scissors
Sample usage:
rps ( Exercise 5 . 2 6 from the textbook ) Write

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 Finance Questions!