Write a small program that will let the user play rock-paper-scissors game against the computer. As...
Fantastic news! We've Found the answer you've been seeking!
Question:
Transcribed Image Text:
Write a small program that will let the user play rock-paper-scissors game against the computer. As you may know, rock beats scissors, scissors beat paper, and paper beats rock. Declare 2 variables that will keep the scores of the user and the computer as "Your_score" and "Pc_score" respectively. Depending on the choices of the players, these variables must be incremented by 1 point or remain the same. To be more clear you can use the table below to decide which one to increment. You can declare more variables if you think it is necessary. You Rock Rock Rock Paper Paper Paper Scissors Scissors Scissors Computer Rock Paper Scissors Rock Paper Scissors Rock Paper Scissors Your_score Your_score Your_score Your_score+1 Your_score+1 Your_score Your_score Your_score Your_score+1 Your_score Pc_score Pc_score Pc_score+1 Pc_score Pc_score Pc_score Pc_score+1 Pc_score+1 Pc_score Pc_score Activate Windows Write a small program that will let the user play rock-paper-scissors game against the computer. As you may know, rock beats scissors, scissors beat paper, and paper beats rock. Declare 2 variables that will keep the scores of the user and the computer as "Your_score" and "Pc_score" respectively. Depending on the choices of the players, these variables must be incremented by 1 point or remain the same. To be more clear you can use the table below to decide which one to increment. You can declare more variables if you think it is necessary. You Rock Rock Rock Paper Paper Paper Scissors Scissors Scissors Computer Rock Paper Scissors Rock Paper Scissors Rock Paper Scissors Your_score Your_score Your_score Your_score+1 Your_score+1 Your_score Your_score Your_score Your_score+1 Your_score Pc_score Pc_score Pc_score+1 Pc_score Pc_score Pc_score Pc_score+1 Pc_score+1 Pc_score Pc_score Activate Windows
Expert Answer:
Related Book For
Posted Date:
Students also viewed these general management questions
-
Write a C# program that will let the user input a grade and determine its rating based on the scale as follows: Grade > 90 81-90 71-80 61-70 Rating A+ A Grade 51-60 41-50 Rating D A- <41 F B
-
Write a C# program that will let the user enter their rank, then determine their salary based on their rank as follows: Salary (Php) 70,000 65,000 Salary (Php) 50,000 Rank Rank 1 4 5 35,000 60,000...
-
Write a small program to determine the endianness of machine and report the results. Run the program on a computer available to you and turn in the output.
-
Should courts ever enforce illegal contracts? If illegal contracts are void as a matter of law, what is the court enforcing? If courts will use equity powers or other roundabout ways to enforce...
-
Refer back to Problem 3-71A. Requirements 1. Use the Mountain Lodge data in Problem 3-71A to prepare the companys classified balance sheet at March 31, 2012. Show captions for total assets, total...
-
Determine whether each relation represents a function. For each function, state the domain and range. Father Bob John Chuck Daughter Beth Diane Linda Marcia
-
A proton has mass \(m_{p}\) and charge \(+e\). The force it exerts on another proton at a distance \(r\) is given by \(F(r)=\frac{1}{4 \pi \in_{0}} \frac{e^{2}}{r^{2}}\) where \(\frac{1}{4 \pi...
-
The complexity and uniqueness of the federal government makes it difficult to conduct a meaningful analysis of its financial condition. However, conducting a financial statement analysis does provide...
-
a) Having graduated with a bachelor of commerce finance option, you have been requested to discuss with other employees in finance department on three ways that are used to describe real estate....
-
Jack C. Schoenholtz was a shareholder and member of the board of directors of Rye Psychiatric Hospital Center, Inc. (Rye Hospital). Four years after the hospital was incorporated, a split had...
-
Discuss the auditor's responsibility for identifying and acting on events subsequent to the reporting date (you need to consider the three defined phases). You may support your answer accounting...
-
What would be the most effective way of raising people out of poverty? a) Cut off welfare payments to every family with at least one adult member between the ages of 18 and 64. b) Raise the minimum...
-
Statement 1: Our trade deficit with China is larger than our trade deficit with Japan. Statement 2: Americans pay lower taxes on gasoline than do the citizens of most of the nations in Western...
-
Our trade deficit with China in 2012 was _____. a) under $100 billion b) between $100 billion and $200 billion c) between $200 billion and $300 billion d) over $300 billion
-
Which is the most accurate statement with respect to our chemical industry? a) It is on the decline and now contributes to our balance of trade defi cit. b) It is large and growing. c) It generally...
-
Which country regularly counterfeits American goods and services, a practice that costs American industry over $200 billion a year? a) Mexico b) Canada c) China d) Japan
-
General Foundry, Inc., a metal works plant in Milwaukee, has long been trying to avoid the expense of installing air pollution control equipment. The local environment protection group has recently...
-
The test statistic in the NeymanPearson Lemma and the likelihood ratio test statistic K are intimately related. Consider testing H 0 : = 0 versus H a : = a , and let * denote the test statistic...
-
Parent classes are ____________ than their child classes. a. Less specific b. More specific c. Easier to understand d. More cryptic
-
a. Create an application named Percentages whose main() method holds two double variables. Assign values to the variables. Pass both variables to a method named computePercent() that displays the two...
-
The values of an objects attributes are known as its ____________. a. State b. Orientation c. Methods d. Condition
-
Pucks 1 and 2 slide on ice and collide. The inertia of puck 2 is twice that of puck 1 . Puck 1 initially moves at \(1.8 \mathrm{~m} / \mathrm{s}\); puck 2 initially moves at \(0.20 \mathrm{~m} /...
-
While designing a conveyor belt system for a new airport, you determine that, when a typical suitcase is moving up an incline of \(20^{\circ}\), the magnitude of the maximum forward acceleration a...
-
Each diagram in Figure 10. 24 indicates the momentum of an object before and after a single force is exerted on it. For each case determine the direction of the force. Data from Figure 10 . 24 (a)...
Study smarter with the SolutionInn App