subject
Computers and Technology, 24.01.2020 23:31 AshNo

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

ansver
Answers: 1

Another question on Computers and Technology

question
Computers and Technology, 23.06.2019 02:30
Rafael needs to add a title row to a table that he has inserted in word. what should he do? use the alignment options. use the merge and center option for all the cells in the top row. use the merge and center option on the first two cells in the top row. none of the above
Answers: 3
question
Computers and Technology, 23.06.2019 14:30
Select the correct answer. sean is a computer programmer. he has programmed an application for toddlers that plays nursery rhymes. however, a logic error has occurred in the program. which problem is a likely consequence of the error? a. the program crashes every time the user wants to play the nursery rhymes. b. the program crosses its buffer boundaries and overwrites an adjacent program. c. the program plays a different nursery rhyme than the one the user intended to play. d. the program shows different structures in its programming language code. e. the program introduces new viruses every time the user plays a nursery rhyme.
Answers: 1
question
Computers and Technology, 23.06.2019 18:30
Where can page numbers appear? check all that apply. in the header inside tables in the footer at the bottom of columns at the top of columns
Answers: 1
question
Computers and Technology, 24.06.2019 00:30
Use the keyword strategy to remember the meaning of the following word. the meaning for the word has been provided. write your keyword and describe the picture you would create in your mind. obfuscate: to make something so confusing that it is difficult to understand.
Answers: 2
You know the right answer?
Rock, paper, scissors is a two-player game in which each player chooses one of three items. if both...
Questions
question
Mathematics, 28.10.2020 18:50
question
Mathematics, 28.10.2020 18:50
question
Mathematics, 28.10.2020 18:50
question
Mathematics, 28.10.2020 18:50
question
English, 28.10.2020 18:50
question
Engineering, 28.10.2020 18:50
Questions on the website: 13722360