1answer.
Ask question
Login Signup
Ask question
All categories
  • English
  • Mathematics
  • Social Studies
  • Business
  • History
  • Health
  • Geography
  • Biology
  • Physics
  • Chemistry
  • Computers and Technology
  • Arts
  • World Languages
  • Spanish
  • French
  • German
  • Advanced Placement (AP)
  • SAT
  • Medicine
  • Law
  • Engineering
nexus9112 [7]
3 years ago
9

Rock, Paper, Scissors is a two-player game in which each player chooses one of three items. If both players choose the same item

, the game is tied. Otherwise, the rules that determine the winner are:
(a) Rock always beats Scissors (Rock crushes Scissors)

(b) Scissors always beats Paper (Scissors cut Paper)

(c) Paper always beats Rock (Paper covers Rock) Implement function rps() that takes the choice ('R', 'P', or 'S') of player 1 and the choice of player 2, and returns −1 if player 1 wins, 1 if player 2 wins, or 0 if there is a tie.


>>> rps('R', 'P') 1


>>> rps('R', 'S') -1


>>> rps('S', 'S') 0
Computers and Technology
1 answer:
mezya [45]3 years ago
7 0

Answer:

The answer is c

Explanation:

You might be interested in
There is a simple method for constructing a magic square for any odd value of n:
DaniilM [7]

Answer:

See Explaination

Explanation:

class MagicSquare():

def __init__(self,side):

self.side=side

self.two_dimension=[]

for row in range(1,side+1):

row_line=[]

for col in range(1,side+1):

row_line.append(0)

self.two_dimension.append(row_line)

def display(self):

row=0

col=int((self.side-1)/2)

for i in range(1,self.side**2+1):

self.two_dimension[row][col]=i

row-=1

col+=1

if row==-1:

row=self.side-1

if col==self.side:

col=0

if self.two_dimension[row][col]==0:

continue

else:

row+=1

if row==self.side:

row==0

for line in self.two_dimension:

for num in line:

print("{0:>3}".format(num),end=" ")

print()

def main():

for i in range(1,14,2):

square=MagicSquare(i)

square.display()

print("----------------------------------------------------")

if __name__ == '__main__':

main()

3 0
3 years ago
Which of the following is an example of an inline element? A. B. C. D.
____ [38]
what are the answers??
3 0
2 years ago
How to calculate 100MB at 56 Kbps to transfer time?
Gelneren [198K]
1MB=1000 kb 

\frac{100*1000Kb}{56Kb/s} ≈ 1748,71 seconds 


ransform in kilobyte and share knowing transfer time :)
3 0
3 years ago
Can anyone explain why red is sus? i saw him do medbay scan...
alexandr402 [8]

Answer:

If u watched him scan then he is good

Explanation:

6 0
3 years ago
In Excel, ____ is/are used to place worksheet, column, and row titles on a worksheet.
vladimir1956 [14]
In excel, [Text] is used to place worksheet, column and row titles on a worksheet.
In excel you can inset text to make comment, to input words or number and to make title. 
8 0
3 years ago
Other questions:
  • One purpose of the dual ignition system on an aircraft engine is to provide for?
    7·2 answers
  • How to eject a flash drive from chromebook?
    6·1 answer
  • Which windows tool can you use to find out if the hard drive is slowing down windows performance?
    9·1 answer
  • When listing columns in the select list, what should you use to separate the columns?
    6·1 answer
  • If a line is 4’ and you scaled it using 1/8” =1’ what would the size of the line be?
    14·1 answer
  • What do you think is the most important factor affecting the collection of digital data and what impact do you think that this f
    13·1 answer
  • Does two core processors mean that it is twice as fast do you agree? why?
    13·1 answer
  • PLEASE HELP ANSWER THIS only if you know BOTH ANSWERS!
    9·2 answers
  • Which of the following involves writing hidden messages so that only the sender and intended recipient know a message exists? St
    5·1 answer
  • Help PLEASE ILL MARK as brainlest
    11·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!