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...
-
Show that if the flux through each turn of an N-turn coil of resistance R changes from m1 to m 2, the total charge passing through the coil is given by Q = N(m1 m2)/R.
-
What spot interest rates are implied by the following Treasury bonds? Assume for simplicity that the bonds pay annual coupons. The price of a one-year strip is 97.56%, and the price of a four-year...
-
Kronos Shipping Companys general manager reports quarterly to the companys president on the firms operating performance. The company has used a budget based on detailed expectations for the...
-
Salamone Heaters selected data for October 2013 are presented here (in millions): Direct materials inventory, 10/ 1/ 2013 $ 75 Direct materials purchased 335 Direct materials used 380 Total...
-
Katrina wants to estimate the proportion of adults who read at least 10 books last year. To do so, she obtains a simple random sample of 100 adults and constructs a 95% confidence interval. Matthew...
-
Cost 100,000 Similar projects, Eta and Zeta, are being considered using the payback method. Each has an initial cost of $100,000. Annual cash flows for each project are provided in the table at the...
-
2 Exercise 8-5 (Algo) Manufacturing Overhead Budget [LO8-6] The direct labor budget of Yuvwell Corporation for the upcoming fiscal year contains the following details concerning budgeted direct...
-
Required information [The following information applies to the questions displayed below.] Cane Company manufactures two products called Alpha and Beta that sell for $170 and $130, respectively. Each...
-
In managing across culture time for change Barbados Use the following 'fish bone' framework to identify what you believe to be the most critical factors leading to one of the following critical...
-
For a 750 kVA, 2300 V/230 V transformer with R = 0.093 2, R = 0.00093 2, X = 0.28 22, and X = 0.0028 2, calculate the voltage regulation at unity power factor, 0.7 lagging power factor, 0.7 leading...
-
19 (10 points) Fill in the blanks of the following C++ programs that print the given output. a. #include using namespace std; int main() C int number; > number= while [ cout < < number 1 return 0;...
-
Find the coefficient of skewness = (Mean Mode)/S.D.: Calculate Pearsons measure of skewness on the basis of Mean, Mode and Standard deviation Calculate from the undernoted table the measure of...
-
Periodic Inventory Using FIFO, LIFO, and Weighted Average Cost Methods The units of an item available for sale during the year were as follows: Jan. 1 Aug. 13 Inventory Purchase 10 units at $49 $490...
-
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
-
What is the Euro Areas total for Groups A and B? Use the following balance of payments data for the Euro Area from the IMF to answer this problem. Assumptions (billion US$) 2000 2001 2002 2003 2004...
-
What is the Euro Areas total for Groups A through C? Use the following balance of payments data for the Euro Area from the IMF to answer this problem. Assumptions (billion US$) 2000 2001 2002 2003...
-
What is the Euro Areas total for Groups A through D? Use the following balance of payments data for the Euro Area from the IMF to answer this problem. Assumptions (billion US$) 2000 2001 2002 2003...
Study smarter with the SolutionInn App