This function determines the winner of a round of the game according to the following rules: •Rock (1) breaks Scissors (3) (winner Rock) •Paper (2) covers Rock (1) (winner Paper) •Scissors (3) cuts...


This function determines the winner of a round of the game according to the following rules:


•Rock (1) breaks Scissors (3) (winner Rock)


•Paper (2) covers Rock (1) (winner Paper)


•Scissors (3) cuts Paper (2) (winner Scissors)


•If both players make the same choice, the round is a draw.


The function takes two input parameters: the computer's choice and the player's choice. The function determines the winner, displays winner of the round, and returns the winner as a string ('computer', 'player', 'draw')


The function takes two parameters, the (integer) choice of the computer and the player. It determines who won the round (or if the round is a draw) and outputs an appropriate message. It also returns the winner as a string value.


There are no new concepts in this function, however, makesure your selection statement covers all the possible combinations.


Provide a pseudocode altorithm for this function


Python



Jun 01, 2022
SOLUTION.PDF

Get Answer To This Question

Related Questions & Answers

More Questions »

Submit New Assignment

Copy and Paste Your Assignment Here