Using Python solve the following question Craps is a dice-based game played in many casinos. Like blackjack, a player plays against the house. The game starts with the player throwing a pair of standard, six-sided dice. If the player rolls a total of 7 or 11, the player wins. If the player rolls a total of 2, 3, or 12, the player loses. For all other roll values, the player will repeatedly roll the pair of dice until either she rolls the initial value again (in which case she wins) or 7 (in which case she loses) (a) Implement function craps() that takes no argument, simulates one game of craps, and returns 1 if the player won and 0 if the player lost. >>> craps() 0 >>> craps() 1 >>> craps() 1 (b) Implement function testCraps() that takes a positive integer n as input, simulates n games of craps, and returns the fraction of games the player won. >>> testCraps(10000) 0.4844 >>> testCraps(10000) 0.492
Roll of dice
We help you get better grades, improve your productivity and get more fun out of college!!
Get 25% Discount on Your First Order
How it works – it’s easy
Place your Order
Submit your requirements through our small easy order form. Be sure to include and attach any relevant materials.
Make a payment
The total price of your order is based on number of pages, academic level and deadline.
We assign the assignment to the most qualified tutor. When the tutor completes the assignment, it is transferred to one of our professional editors to make sure that the assignment meets all of your requirements.
Once complete, we’ll send your assignment via the email provided on the order form.