for loopcouter in range(100000):
    count = [0] * 5
for i in range(5):
    while True:
        dice = random.randint(1, 6)
count[i] += 1
if dice == 6:
    break
allcount += max(count)
averagecount = allcount // 100000
print(('the total number of throws is', allcount))
print(('the average number of throws is', averagecount))
Count throws for sixes in rolling dice python