cipheron

Untitled

Nov 20th, 2025
62
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.35 KB | None | 0 0
  1. import random
  2.  
  3. runs=10000
  4. total=0
  5. for i in range(runs):
  6. rolls=0
  7. w=[]
  8. while True:
  9. rolls+=1
  10. w.append(random.randint(1,6))
  11. if len(w)>6: w=w[1:]
  12. if w==[1,2,3,4,5,6]:
  13. total+=rolls
  14. break
  15. print(".", end='')
  16. if(i % 80 == 0):
  17. print("")
  18.  
  19. print(total/runs)
  20. input()
Advertisement
Add Comment
Please, Sign In to add comment