Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Python Program 2. Rock, Paper, Scissors (20 points:) In this problem, we will design a simple Rock, Paper and Scissors game that can be played

Python Program

image text in transcribed

2. Rock, Paper, Scissors (20 points:) In this problem, we will design a simple Rock, Paper and Scissors game that can be played with the computer. For those unfamiliar with the game, please read this Wikipedia article. In its simplest terms, two players decide to choose rock, paper or scissors simultaneously. The outcome of the game is given by the following table. tie player 1 player 2 outcome rock rock rock paper paper wins rock scissors rock wins paper paper tie paper scissors scissors wins scissors scissors tie Make the computer choose either rock, paper or scissors randomly. Then accept users choice and print the outcome of the game. If the user types "uit" or any invalid input, the game should end. A sample input and output for each outcome is shown below. Please name your program rock-paper-scissors.py. 1 Sample Input and Output: Lets play a game of Rock, Paper and Scissors I have selected mine, what do you select [type rock, paper or scissors]? rock I chose paper. You chose rock. I win. Lets play a game of Rock, Paper and Scissors I have selected mine, what do you select [type rock, paper or scissors]? rock I chose rock. You chose rock. It's a tie. Lets play a game of Rock, Paper and Scissors I have selected mine, what do you select [type rock, paper or scissors]? rock I chose scissors. You chose rock. You win. Lets play a game of Rock, Paper and Scissors I have selected mine, what do you select [type rock, paper or scissors]? avocado Thanks for playing

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Intelligent Information And Database Systems 6th Asian Conference Aciids 2014 Bangkok Thailand April 7 9 2014 Proceedings Part I 9 2014 Proceedings Part 1 Lnai 8397

Authors: Ngoc-Thanh Nguyen ,Boonwat Attachoo ,Bogdan Trawinski ,Kulwadee Somboonviwat

2014th Edition

3319054759, 978-3319054759

More Books

Students also viewed these Databases questions