Write a program that will simulate the Rock-Paper-Scissors game. Allow two players to input one at...
Fantastic news! We've Found the answer you've been seeking!
Question:
Transcribed Image Text:
Write a program that will simulate the Rock-Paper-Scissors game. Allow two players to input one at a time: (P or p) for Paper, (R or r) for Rock. (S or s) for scissors. Your program should display who the winner is and the reason for winning: Paper covers rock, Rock breaks scissors, and Scissors cut paper. Allow users to accept letter inputs in any case. When you have completed your program and verification, use your program to complete the test data table below. Provide the following comments: date, author, program description. (Include all possible inputs of player 1 and player 2) Sample Output: Player 1 input: P Player 2 Input: R Player 1 wins the game because paper covers rock Test Data: Player 1 Р S S Input Player 2 R Р R Winner Р S R Output Reason Paper covers rock Scissor cut paper Rock break scissor Write a program that will simulate the Rock-Paper-Scissors game. Allow two players to input one at a time: (P or p) for Paper, (R or r) for Rock. (S or s) for scissors. Your program should display who the winner is and the reason for winning: Paper covers rock, Rock breaks scissors, and Scissors cut paper. Allow users to accept letter inputs in any case. When you have completed your program and verification, use your program to complete the test data table below. Provide the following comments: date, author, program description. (Include all possible inputs of player 1 and player 2) Sample Output: Player 1 input: P Player 2 Input: R Player 1 wins the game because paper covers rock Test Data: Player 1 Р S S Input Player 2 R Р R Winner Р S R Output Reason Paper covers rock Scissor cut paper Rock break scissor
Expert Answer:
Answer rating: 100% (QA)
Heres a simple Python program for simulating the RockPaperScissors game RockPaperScissors Game def g... View the full answer
Related Book For
Posted Date:
Students also viewed these programming questions
-
"How might incorporating personalized learning paths for employees impact their skill acquisition and overall performance within an organization's training and development program?"
-
1. Was 1MDB a fraudulent venture from the beginning? Why or why not? 2. How did the US Government become involved in the 1MDB saga? 3. What does the involvement of so many financial institutions in...
-
The Dow Jones Industrial Average on July 20, 2016 was 18,580 and the price of a September 185 (European) call option on the index was $3.35. Use the DerivaGem software to calculate the implied...
-
What is the present value of $4,000 per year, at a discount rate of 10%, if the first payment is received six years from now and the last payment is received 20 years from now?
-
A uniform magnetic field fills a cylindrical volume of radius \(R\), and the field magnitude changes with time at an unknown rate. At a certain instant, the electric field magnitude at a radial...
-
Otay Lakes Park is a private camping ground near the Mount Miguel Recreation Area. It has compiled the following financial information as of December 31, 2017. Instructions (a) Determine Otay Lakes...
-
When an object is placed at the focus of a concave mirror, the image formed is (i) at infinity (ii) real and inverted, and (iii) highly magnified (or highly enlarged) M E A D C B P F At infinity N
-
Pacifico Company, a U.S.-based Importer of beer and wine, purchased 1,500 cases of Oktoberfest-style beer from a German supplier for 375,000 euros. Relevant U.S. dollar exchange rates for the euro...
-
An object of mass 2.8kg is moving in the negative direction at a velocity of 2.8m/s. It experiences the force for 2.7s. What is the final velocity (in m/s) after the object has experienced the...
-
Identify two sites on the Superfund website in the state of Florida and what business(es) contributed to the contamination, what remediation is taking place today and any facts to really help...
-
Simplify the expression to a form in which 2 is raised to a single integer power. (25)32-7 2-6
-
You have calculated the historical dollar weighted return, annual geometric average return and annual arithmetic average return. You always reinvest your dividends and interest earned on the...
-
In some ways, a qualitative portfolio manager could never really be an index portfolio manager, whereas a quantitative portfolio manager could be. Explain why.
-
Mr. Amar is 30 year old, newly married and a successful actor in the Indian film industry. Right from his struggling days, Amar always saved a part of his income and invested in safe instruments like...
-
Mehta manufactures high-quality textile which employs 2,000 manufacturing staff and 250 other staff (supporting). Its products are used by both amateur and professional sports players in its home...
-
What kind of rays are X-rays?
-
Write a program that uses nested loops to collect data and calculate the average rainfall over a period of years. First the program should ask for the number of years. The outer loop will iterate...
-
Design a class that holds the following personal data: name, address, age, and phone number. Write appropriate accessor and mutator methods. Demonstrate the class by writing a program that creates...
-
Write a do-while loop that asks the user to enter two numbers. The numbers should be added and the sum displayed. The loop should ask the user whether he or she wishes to perform the operation again....
-
Describe how competence, caring, and character affect your credibility as a communicator.
-
Explain the importance of establishing credibility for business communications.
-
Define and explain business ethics, corporate values, and personal values.
Study smarter with the SolutionInn App