r/inventwithpython • u/okaydexter • May 21 '20
Casual Programming With Python & Music : Determine Heads & Tails When A Coin Is Flipped 1000 Times
https://youtu.be/iLlEpqHuYYE[removed] — view removed post
8
Upvotes
r/inventwithpython • u/okaydexter • May 21 '20
[removed] — view removed post
2
u/masasin May 22 '20 edited May 22 '20
Why'd you import itertools?
Bonus: Python 3.6+ allows you to use
random.choices(sides, k=1000).You could also use
collections.Counterto count for you instead of running through the whole thing every time, which might be useful if you have many more options.