Generation

generate functionSun, 13 Nov 2022

average number of trails to obtain all six sides of a dice at least once.

def throw(n): import random trials = 0 while n != 6: n = random.randint(1, 6) trials += 1 return trials throw(1)

Want to kickstart your project?Use the new AI Studio to create your code