On Thu, Dec 14, 2017 at 3:23 AM,  <p...@lanscape.io> wrote:
> from random import randint
>
> rolls = [randint(1, 6) for x in range(50)]
> print("Average: %s" % (sum(rolls) / len(rolls)))
> print("Most Common: %s" % max(rolls, key=rolls.count))

Great demo of a bad algorithm. :)

ChrisA
-- 
https://mail.python.org/mailman/listinfo/python-list

Reply via email to