Question: This is for python 3. I cannot figure out this coding and am stuck with the random.randint function. Please help. Thank you Write a function,
Write a function, count rolls_until, that takes one target integer as parameter, (a number 1 through 6) and rolls a six-sided die until getting the target number. This function should return the number of rolls required. You do not need to import random, We have already done this for you! You should only use the random.randint (min, max) function from the random module (no need for other functions, and you might break our tests if you use them!). For example: Test print(count_rolls_until(3)) 2 print(count_rolls_until(5)) 1 Result
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
