Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Python question Simulating Gombaud Gombaud bet he would roll at least one 6 in 4 rolls of a single die. Later he began betting he

image text in transcribedPython question

Simulating Gombaud Gombaud bet he would roll at least one 6 in 4 rolls of a single die. Later he began betting he would roll a pair of sixes in 24 rolls of a pair of dice. Write a function called gombaud that simulates playing Gombaud's game (in a more general sense). gombaud should take the arguments 1. count, the number of dice used in the game 2. sides , the number of sides the dice have 3. rolls, the number of times the "player" is allowed to roll to win gombauds and False if it resulted in a loss. Remember, this function is a simulation. It should work by repeatedly calling dice and checking for a win (rather than calculating the probabilities of winning) Note: because the game is generalized to be played on any type of die, consider a win to be rolling all 1s (rather than rolling all 6s). This change doesn't change the odds of winning the game for six-sided dice and, it will work for any kind of die. So a simulation of Gombaud original game followed by a simulation of his newer game would look like: # roll one 6-sided die 4 times. >>gombaud (1, 6, 4) True # roll two 6-sided dice 24 times gombaud (2, 6, 24) True Note:I got lucky here and won both games, but that won't always be the case

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

More Books

Students also viewed these Databases questions