
● Simulate the game (this will require using while and if statements as we learned in class) by using the round and trial counters you have established.
● Store a win for Player 1 or Player 2 after each round (indicate a win by a 1 and a loss by a 0).
● Store the cumulative wins of each player after each round (“P1Wins_Talley” and “P2Wins_Talley”).
● Store the overall game results in a matrix called “store_results”. Column 1 lists the round number, Column 2 lists the total number of trials in that round , Column 3 records which player won that round (1 or 2) , Column 4 records the value of Dice 1 , Column 5 records the value of Dice 2 , Column 6 records the sum of the two dice at the end of that round (which should equal the value in Column 1)
I am having trouble incorporating the following things in my code. I have a round counter but also need to add a trial counter. For each round, player 1 or player two must roll with two dice the value of the current round. (For example, if its round 4, the player must roll a 4 by rolling a 3 and a 1 or tow 2's). If neither player rolls the round value, continue until a player rolls the current number with the amount of trials per round to roll the round value. Bascially, the beginning of the code is assigning variables and the amount of sides of a die. I am using a 6 sided die for 11 rounds (2-12).



Trending nowThis is a popular solution!
Step by stepSolved in 5 steps

- Extra tutorial : Refer to the "Guess the fruit" example. As a programmer, suggest strategies so your output prediction is highly accurate ? Determine other similar application in healthcare ? Apple B Apple CS Apple G1 Apple G2 Apple G3 Apple GS Apple PL Apple RY2 Apricot Avocado Avocado R Banana Banana LF Banana R Carambula Cauliflower Cherry 1 Cherry 2 Chery R Cherry WB Chery WR Eggplant Ginger Root Granadilla Grape B Grape P Grape W Grape W2arrow_forward● Simulate the game (this will require using while and if statements as we learned in class) by using the round and trial counters you have established. ● Store a win for Player 1 or Player 2 after each round (indicate a win by a 1 and a loss by a 0). ● Store the cumulative wins of each player after each round (“P1Wins_Talley” and “P2Wins_Talley”). ● Store the overall game results in a matrix called “store_results”. Column 1 lists the round number , Column 2 lists the total number of trials in that round , Column 3 records which player won that round (1 or 2) , Column 4 records the value of Dice 1 , Column 5 records the value of Dice 2 , Column 6 records the sum of the two dice at the end of that round (which should equal the value in Column 1) I am creating a game where two players try to roll two die that equal the current round. For example, if the round is 3, the players must roll a 2 and a 1. I have written this code so far, but I am not getting the end result I need. I was hoping…arrow_forwardMake any necessary modifications to the RushJob class so that it can be sorted by job number. Modify the JobDemo3 application so the displayed orders have been sorted. Save the application as JobDemo4. An example of the program is shown below: Enter job number 22 Enter customer name Joe Enter description Powerwashing Enter estimated hours 4 Enter job number 6 Enter customer name Joey Enter description Painting Enter estimated hours 8 Enter job number 12 Enter customer name Joseph Enter description Carpet cleaning Enter estimated hours 5 Enter job number 9 Enter customer name Josefine Enter description Moving Enter estimated hours 12 Enter job number 21 Enter customer name Josefina Enter description Dog walking Enter estimated hours 2 Summary: RushJob 6 Joey Painting 8 hours @$45.00 per hour. Rush job adds 150 premium. Total price is $510.00 RushJob 9 Josefine Moving 12 hours @$45.00 per hour. Rush job adds 150 premium. Total price is $690.00 RushJob 12 Joseph Carpet cleaning 5 hours…arrow_forward
- Explain why this scenario requires the use of a loop structure. Scenario: Angel wants to find the first instance of a prime number greater than 999,999.arrow_forwardHow to Use/Re-Use a Variable Explain how many variables to set up in order to solve a problem in the lab class. Use an example to explain how the variables are changed.arrow_forwardPlease explain why this is the correct answer.arrow_forward
- 11. Which among the following classes are used in decoding data? They don't have to be used together every time. Select all answers that apply. Take note that this is a right minus wrong question. Which among the following classes are used in decoding data? They don't have to be used together every time. Select all answers that apply. Take note that this is a right minus wrong question. 1. PropertyListDecoder 2.JSONDecoder 3.URL 4. FileDecoderarrow_forwardPythonarrow_forwardComplete the recursive drawBoxes() method so that it will draw all of the boxes in the image below. It currently only draws the first and smallest Box. Feel free to use a different shape if you do not like boxes.arrow_forward
- Database System ConceptsComputer ScienceISBN:9780078022159Author:Abraham Silberschatz Professor, Henry F. Korth, S. SudarshanPublisher:McGraw-Hill EducationStarting Out with Python (4th Edition)Computer ScienceISBN:9780134444321Author:Tony GaddisPublisher:PEARSONDigital Fundamentals (11th Edition)Computer ScienceISBN:9780132737968Author:Thomas L. FloydPublisher:PEARSON
- C How to Program (8th Edition)Computer ScienceISBN:9780133976892Author:Paul J. Deitel, Harvey DeitelPublisher:PEARSONDatabase Systems: Design, Implementation, & Manag...Computer ScienceISBN:9781337627900Author:Carlos Coronel, Steven MorrisPublisher:Cengage LearningProgrammable Logic ControllersComputer ScienceISBN:9780073373843Author:Frank D. PetruzellaPublisher:McGraw-Hill Education





