Question

Children often play the game of rock, paper, and scissors. This game has two players, each of whom chooses one of the three objects: rock, paper, or scissors. If player 1 chooses rock and player 2 chooses paper, player 2 wins the game because paper covers the rock. The game is played according to the following rules:

  • If both players choose the same object, this play is a tie.
  • If one player chooses rock and the other chooses scissors, the player

choosing the rock wins this play because the rock breaks the scissors.

  • If one player chooses rock and the other chooses paper, the player

choosing the paper wins this play because the paper covers the rock.

  • If one player chooses scissors and the other chooses paper, the player

choosing the scissors wins this play because the scissors cut the paper.

Write an interactive program that allows 1 person to play this game against the computer.

Input This program has two types of input:

  • The users’ responses when asked to play the game.
  • The players’ choices.

Output The players’ choices and the winner of each play. After the game is over, the total number of plays and the number of times that each player won should be output as well. (programming language is C#)

Expert Answer

Want to see the step-by-step answer?

Check out a sample Q&A here.

Want to see this answer and more?

Experts are waiting 24/7 to provide step-by-step solutions in as fast as 30 minutes!*

*Response times may vary by subject and question complexity. Median response time is 34 minutes for paid subscribers and may be longer for promotional offers.
Tagged in
Engineering
Computer Science

Programing Language

Related Computer Science Q&A

Find answers to questions asked by students like you.

Q: Which statement can you put in your ~/.tcshrc file to prevent accidentally overwriting a file when y...

A: Solution: Tcsh shell variables are the enhancement of unix  C Shell system.They consume less time an...

Q: Given a circle radius r = 15, use the Bresenham’s circle drawing algorithm to draw a circle

A: Given a circle radius r = 15, use the Bresenham’s circle drawing algorithm to draw a circle Solution...

Q: 10. Write briefly about the following:1. Bus skew and clock skew2. Machine Exceptions3. 2-Bus and 3-...

A: 1) Bus skew and clock skew Bus Skew :-  Skew occurs when two signals simultaneously transmitted from...

Q: in C program There are 9,870 people in a town whose population increases by 10% each year.Write a lo...

A: In the solution of given problem, we need to initialized, years variable with current population (98...

Q: 1. Your program has three functions defined: void a(), void b(), and void c(), followed by your main...

A: The function definition tells the compiler what task the function will be performing.  A function de...

Q: Use examples to compare and contrast unstructured and structured data. Which type is more prevalent ...

A: Unstructured data It is the information or data that do not have any meaning or logic. This results ...

Q: Assume you are using a array-based queue and have just instantiated a queue of capacity 10. You enqu...

A: option A is correct i.e., 0

Q: This is the question: Create an Automobile class for a dealership. Include fields for an ID number, ...

A: Given Class  Automobile contains the following private fields id of type integer make of type Strin...

Q: Write the pseudocode that will produce a slip similar to the one illustrated atthe beginning of the ...

A: Print the store name Print the VAT number initialize total as 0 for every item purchased:           ...

Q: Find and summarize two peer-reviewed research articles related to ethics in project management

A: Articles related to ethics in project management: Article #1: The first article is on "Bullying at ...

Q: In this lab, you use what you have learned about searching an array to find an exact match to comple...

A: #include <iostream> #include<algorithm> using namespace std; int main() { // Declare var...

Q: Please help asap

A: Given: The following was encrypted using the Hill Cipher with a 2 x 2 matrix as the key. Determine b...

Q: Describe the structure of a C# Program with proper code-structure

A: C# is an object-oriented language, it consists of many sub-parts. They are- Namespace declaration C...

Q: Using Python

A: Note: Hello. Since your question has multiple parts, we will solve the first question for you. If yo...

Q: can you help me to solve questons d,e,f,g,h?

A: SELECT CLIENT_NAME FROM CLIENT WHERE LOCATION="MELAKA" ORDER BY LOCATION ASC    

Q: Consider the below code snippet.  Assume bool foundPair and int pairCount are both declared and have...

A: Answer : True.  

Q: Assume that you are the database developer for this task, complete the information-level design for ...

A: Patient(Patient_ID, p_name, phone, email,home_address) Doctor (identification_number, d_name, teleph...

Q: C++ Programming Exercise: When you borrow money to buy a house, a car, or for some other purpose, yo...

A: PROGRAM: //Header file #include<iostream> #include<iomanip>   //Using namespace using na...

Q: Use iteration to find an explicit formula for the sequence bo, b1, b2, ...

A: Two questions are asked so we will provide the answer to the first question only. Please upload anot...

Q: Write a program to print following triangle using nested for loop.

A: Explanation:- To display pattern of triangle first we will take number of rows from user in variable...

Q: Mick’s Wicks makes color straw in various sizes. Create a class for the business named Straw that co...

A: Objective: This program implements the concept of inheritance in which Straw class is the parent cla...

Q: What is the difference between Radio button and checkbox

A: In case of radio button group, you can choose only one option whereas in checkbox group you can sele...

Q: What type of security was dominant in the early years of computing? Explain

A: Dominant security of computing in early stages The only security concerned with computing is physic...

Q: Derive the SOP and POS expression for the truth table shown below..

A: Given truth table is  A B C D X 0 0 0 0 0 0 0 0 1 0 0 0 ...

Q: Convert the following NFA to a regular grammar using the procedure described in class. 1 1 93 1 92

A: Converting NFA to Regular expression: Step 1: To fix the NFA, first one should add tow states S and ...

Q: Draw a line with end points  (30, 10) and (15, 25) using Bresenham’s line algorithm.

A: In Bresenham's line drawing algorithm, the main advantage is that we don't involve any floating poin...

Q: When a validation rule is violated, Access displays the text in the Validation Text property box. Wh...

A: The Validation rules check that a data enter by the user in a record meets the measures we define be...

Q: Assume that you work in a company with a firewall configured to protect the internal network from th...

A: Firewall: Network firewalls are authentication mechanisms used to stop or minimize unauthorized acce...

Q: Help me solve this problem!: Method Skeletons and a Loop Roundup Practice these steps again and then...

A: Here, we have used for loop and if-else statements to implement the required functions. For loop is ...

Q: Problem 11 Use the Master theorem to find the asymptotic complexity (O) of this function: T(n) = n +...

A: Master theorem The master theorem is a recipe that gives asymptotic estimates for a class of recurre...

Q: The main thread of a Java program can generate additional threads. true or false It is possible...

A: Objective: Two statements are given regarding computer programming and they need to be verified if t...

Q: If N represents the number of elements in the queue, then the dequeue method of the LinkedQueue clas...

A: The Answer is False because when we see the dequeue method it have statements which have constant ti...

Q: Python code required

A: import numpy as np import pandas as pd #asking input from user touchdown = int(input("Number of tou...

Q: Difference between TextBox, MaskedTextBox How do you make TextBox use all uppercase or lowercase cha...

A: ANS: - TextBox vs MaskedTextBox S.No. TextBox MaskedTextBox 1. It is primarily used to obtain t...

Q: Write a program to implement the algorithm that you designed in Exercise 20 of Chapter 1. (Assume th...

A: import java.io.*; import java.uti.*; public class Teter{ public static void main(String[] args) thro...

Q: complete all the implementation of the member functions listed in the class interface for the follow...

A: The template class for implementing stack using linked list is done as follows: Create the class No...

Q: Problem_#07] Derive the SOP and POS expression for the truth table shown below. ABC X 000 001 010 01...

A: Click to see the answer

Q: Write a Java programming Language that will accept name of user, three (3) score grades, display the...

A: import java.uti.Scanner; public class PFailed2{ public static void main(String[] args){    Scanner s...

Q: 1. Assume an int is size 4 bytes on our system.  What is the size in bytes of the following array: i...

A: In the given array, we have 20 int elements and each int element takes 4 bytes. Hence, the size of a...

Q: Assign objectData with a JSON object with properties: userName (a string), studentAge (a number) and...

A: JSON Objects are: Surrounded by curly braces { }. Written in key/value pairs. Note: Keys must be ...

Q: How does concrete RTN differ from abstract RTN. Give examples.

A: Abstract RTN is made to be Portable and so, doesn't have any specifics of the machine. To the opposi...

Q: 4.19 In Python, Write a program that first gets a list of integers from input. The input begins with...

A: Approach We will use for loop to iterate over each list element and if statement to check whether th...

Q: Write a program that takes in a line of text as input, and outputs that line of text in reverse. The...

A:   Code in java is below- import java.util.Scanner;  // importing the util package   public class Lab...

Q: informs the bash shell that when you enter see, you want the more utility executed. In ubunto-Linux.

A: Objective: According to this question, we need to write a command in the ubuntu-Linux system so that...