Python homework

paul at lanscape.io paul at lanscape.io
Wed Dec 13 11:23:21 EST 2017


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))



More information about the Python-list mailing list