Write a program that lets the user play the game of rock

Assignment Help Programming Languages
Reference no: EM131942306

Problem

Write a program that lets the user play the game of Rock, Paper, Scissors against the computer. The program should work as follows:

1. 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. If the number is 2, then the computer has chosen paper. If the number is 3, then the computer has chosen scissors. (Don't display the computer's choice yet.)

2. The user enters his or her choice of "rock," "paper," or "scissors" at the keyboard. 3. The computer's choice is displayed. 4. A winner is selected according to the following rules:

• If one player chooses rock and the other player chooses scissors, then rock wins. (The rock smashes the scissors.)

• If one player chooses scissors and the other player chooses paper, then scissors wins. (Scissors cuts paper.)

• If one player chooses paper and the other player chooses rock, then paper wins. (Paper wraps rock.)

• If both players make the same choice, the game must be played again to determine the winner.

Reference no: EM131942306

Questions Cloud

Has mary stolen dave copyright : (a) Has Mary 'stolen' Dave's copyright? Explain your answer. (b) What aspects of the advertising campaign would be covered by copyright?
Create and design uml model which compare price of an item : Create and design an UML model, which compare the price of an item and present that to costumer on line for selection and purchasing purpose.
What is the principal arguments of pharma companies : What is the principal arguments of pharma companies who oppose making exception to IPR laws for developing countries.
Explain the classical and behavioral decision theory : Most of us have access to decision-making support from expert systems that reason like human experts and follow "either-or" rules to make deductions.
Write a program that lets the user play the game of rock : Write a program that lets the user play the game of Rock, Paper, Scissors against the computer. The user enters his or her choice of rock, paper or scissor.
How much will they have to save each year for next year : How much will they have to save each year for the next 50 years, in real dollars, to reach their retirement goal?
Breathing difficulties and reduced pulse oximetry : The patient you are treating is like the example in the overview, an elderly man who presented with breathing difficulties and reduced pulse oximetry.
Persuasive argument essay about ilegal inmmigration dreamers : Persuasive Argument essay about ilegal inmmigration dreamers - you will argue in favor of your position and refute what you see as your critic's objections
Review the opening case regarding coca-cola and pepsico : Review the opening case regarding Coca-Cola and PepsiCo. Discuss how the environment affects the corporate-level and strategy of these businesses?

Reviews

Write a Review

Programming Languages Questions & Answers

  Write a haskell program to calculates a balanced partition

Write a program in Haskell which calculates a balanced partition of N items where each item has a value between 0 and K such that the difference b/w the sum of the values of first partition,

  Create an application to run in the amazon ec2 service

In this project you will create an application to run in the Amazon EC2 service and you will also create a client that can run on local machine and access your application.

  Explain the process to develop a web page locally

Explain the process to develop a Web page locally

  Write functions

These 14 questions covers java class, Array, link list , generic class.

  Programming assignment

If the user wants to read the input from a file, then the output will also go into a different file . If the user wants to read the input interactively, then the output will go to the screen .

  Write a prolog program using swi proglog

Write a Prolog program using swi proglog

  Create a custom application using eclipse

Create a custom Application Using Eclipse Android Development

  Create a application using the mvc architecture

create a application using the MVC architecture. No scripting elements are allowed in JSP pages.

  Develops bespoke solutions for the rubber industry

Develops bespoke solutions for the rubber industry

  Design a program that models the worms behavior

Design a program that models the worm's behavior.

  Writing a class

Build a class for a type called Fraction

  Design a program that assigns seats on an airplane

Write a program that allows an instructor to keep a grade book and also design and implement a program that assigns seats on an airplane.

Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd