Answered You can hire a professional tutor to get the answer.

QUESTION

Question 3 Rolling a six is unfortunate in this game. Neither player wants a 6, yet they cannot avoid it. Figure out how many rolls it takes until a...

Question 3 Rolling a six is unfortunate in this game. Neither player wants a 6, yet they cannot avoid it. Figure outhow many rolls it takes until a player rolls a 6 with a certain die. def rolls_until_six(die):"""Roll the die until you get a 6 and return the number of rolls it took to do so.If six is not a the possible values to roll, return a string saying '6 is not a pc>>> rolls_until_six(dice(1, 5))'6 is not a possible value of this die'>>> rolls_until_six(dice(6, 6)) # Takes one roll to get 61>>> x = sum( [rolls_until_six(dice(1, 6)) for _ in range(160)])/1@fi # Repeat 100 ti>>> 5 <= x <= 7 # Check that it takes between 5 and 7 rolls overall on averageTrue "*** YOUR CODE HERE ***" Use OK to test your code: python3 0k —q rolls_until_six
Show more
LEARN MORE EFFECTIVELY AND GET BETTER GRADES!
Ask a Question