\"The basic game of craps is very simple. On the first roll of the two dice (the
ID: 3833137 • Letter: #
Question
"The basic game of craps is very simple. On the first roll of the two dice (the come-out roll), the shooter wins by rolling either a 7 or 11 (a natural). Rolling craps (2, 3, or 12) loses. Any other number (4, 5, 6, 8, 9, or 10) is called the point. To win, the point number must be rolled before a 7. Winning is also known as passing. If a 7 is rolled before the point number, the shooter has sevened-out and loses." You want to create a method that simulates a game of craps and returns true if the shooter wins the game and false if the house wins. In your main method you should find an estimate of what percentage of time the shooter wins the game, by calling your method many times (try 100,000) and keeping a counter of the number of wins.Explanation / Answer
Note: Because of randomness may be you will get different output for each run
output:
49.195% Shooter win the game
Related Questions
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.