Question: #computer choice code. Co 2 #player choice code DESCRIPTION Write a program that lets the user play the game Rock, Paper, Scissors against the computer.

 #computer choice code. Co 2 #player choice code DESCRIPTION Write a

#computer choice code. Co 2 #player choice code DESCRIPTION Write a program that lets the user play the game Rock, Paper, Scissors against the computer. The program should work as follows: When the program begins, a random number in the range of 1 through 3 is generated. If the number is 1, then the computer has chosen rock 2 corresponds to paper and 3 corresponds to scissors. To set up the random number, write the following at the top of your code: import random computerChoice = random.randint(1,3) #who won? #display information here. The user chooses rock, paper, or scissors. Suggestion: Tell the user to enter 1-3 for their choice and input it as a number. The computer's choice is displayed. The player's choice is displayed. A winner is selected and outputted using the following rules: Rock beats scissors Scissors beats paper Paper beats rock If both players make the same choice, it is a tie. Display a message that says one of the following: Player wins! Computer wins! . Tie

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!