Rock, Paper, Scissors
In this unit, you expanded your Python skills, and now you can really have some fun! In this lab, you are going to create a game that allows the user to play Rock, Paper, Scissors against the computer. If you aren’t familiar with this classic game, here’s how it works: two people (or a person and a computer!) each select either rock, paper, or scissors. The player who chooses the stronger object wins. Here is how the winner is determined:

Rock beats scissors because a rock can break scissors.
Paper beats rock because paper can cover a rock.
Scissors beats paper because scissors can cut paper.
Go to https://repl.it/ to write your program.

Your program should do the following:

Randomly choose rock, paper, or scissors for the computer
Ask the user to choose rock, paper, or scissors
Compare the computer’s choice to the player’s choice
Announce whether the computer or the human won
Here are two hints to help you write this program:

Test parts of your program to see if they work before moving on to work on other parts. For example, you will need to have the computer select a random number and then choose for that number to correspond to rock, paper, or scissors. You can write just that portion of the program and then test it by having the program print the word “rock,” “paper,” or “scissors” before you even begin working on the part of the program where the user inputs their choice. (Of course, don’t forget to erase the line of code that prints the computer’s choice when you are finished testing—otherwise the game will be just a bit too easy for the user!)
On a piece of paper, draw a chart that shows all nine possible outcomes of the game and use that chart to design and test the program. The chart might look like this:
TABLE 1 Rock paper scissors outcomes
Computer chooses rock Computer chooses paper Computer chooses scissors
User chooses rock

Tied game

Computer wins

User wins

User chooses paper


User chooses scissors


Run several tests on your program to be sure that the correct winner is announced.

When your program works properly, take a screenshot of your code to turn in.

Answers

Answer 1

import random

computer_choice = random.choice(['rock', 'paper', 'scissors'])

player_choice = input('Choose rock, paper, or scissors: ')

if player_choice == computer_choice:

   print('Tie. Both players chose '+player_choice)

elif (player_choice == 'rock' and computer_choice == 'scissors') or (player_choice == 'paper' and computer_choice == 'rock') or (player_choice == 'scissors' and computer_choice == 'paper'):

   print('You won! '+player_choice +' beats '+computer_choice)

else:

   print('You lost! '+computer_choice+' beats '+player_choice)

I wrote my code in python 3.8. I hope this helps. Note the elif statement is actually one line of code but it looks like it takes up more than one line.

Answer 2
I actually think I might have forgor

Related Questions

Please help me on this I don't know which one they are​

Answers

Hi, the photo doesn’t show the question on what to answer, all I see are empt boxes, if you message me the question I will answer it for you!
I’m sorry I don’t understand the question no no no which means I don’t know what the answer would be so please include a different picture maybe I could help you and I think this might be here in a different subject I’m not sure because I don’t know what the question is I’m sorry I really wish I could help

Question 2 of 3
Based on the descriptions below, which website is most appropriate?
A. a site that asks you to send $10 to help schoolchildren in Uganda
B. a site that describes violent behavior
C. a site that asks for your personal information to enter a contest to win a new bike
D. a site sponsored by a government agency that gives you factual information

Answers

Answer: D

Explanation: You don't need to give money, information, or watch any inappropriate content on the gov website. It's safe and all you do is read.

D, it's for information and you don't actually have to look at anything other than just reading about it (that's if it's actually for reading) It's just a harmless website, but the other ones would make you pay or maybe risk your safety.
Other Questions
What would x be for this to be true -4x=5 Fun question: Which Disney character is your favorite? Make sure its detailed!! Will give out Brainlist!! A manufacturer has 5,634 pens to divide into packs of 4 pens. The manufacturer makes as many packs as possible.How many packs of pens does the manufacturer make, and how many pens are left over? What is the difference in elevation between -92 and 3720 Lee y escoge la opcin con la palabra o palabras correctas para completar la frase. Read, and choose the option with the correct word or words to complete the sentence. Los crticos han reconocido al Barroco como una imposicin imperial sobre las colonias espaolas subyugadas y como una expresin localizada de resistencia a conciencia; fueron las intervenciones artsticas de marginados africanos, indios, mestizos y, sobre todo, criollos. El Barroco del Nuevo Mundo es, pues, el resultado de la colonizacin transatlntica, la esclavitud y la transculturacin, y se le atribuye a menudo como el movimiento literario fundacional de Amrica Latina.Segn la lectura, El Barroco en el Nuevo Mundo sucedi cuando los esclavos, indios y mestizos empezaron a ________ sus resistencias al colonialismo a travs de la literatura. transferir plasmar introducir editar f(x) = 3^x-9. find the inverse of f(x). ASAP I NEED HELP LAST QUESTION AND 15 MINS LEFT Will mark brainliest theres a button for the pic 1. How many pyramids are there in Meso- & South America? HELP ILL GIVE BRAINLIEST state two ways of moving an icon from one location to another In need of help its due in an hour!! Ill give brainliest to the best answer Please and thx Help please Thanks According to the USC Annenberg School of Communications findings on verypopular films released in the United States and Canada in 2008, which groupwas most underrepresented?A. African AmericansB. HispanicsC. Middle EasternersD. Asians In a sample of 42 water specimens taken from a construction site, 26 contained detectable levels of lead. Construct a 95% condence interval for the proportion of water specimens that contain detectable levels of lead Compute the height (in meters) of a cylinder with a radius of 2m andvolume 138 cubic meters. Round to the nearest meter. What is the answer? I don't understand how you are meant to work it out Read the paragraph from the section"Lincoln thought colonization couldresolve the issue of slavery."Lincoln believedcolonization was the bestway to solve the problemof slavery. Colonizationwas the idea thatAmerican blacks shouldhave the choice to moveto Africa. Or maybe toHaiti or Panama.What did Lincoln mean by"colonization"? What is the answer correct answer someone please tell me I need the answer ASAP You will get brainlest if its correct How many problems does Jay-Z have On a map, 1 inch equals 7.4 miles. Two houses are 1.5 inches apart on the map.What is the actual distance between the houses?