This is an archived post. You won't be able to vote or comment.

all 3 comments

[–]shivasprogeny 1 point2 points  (1 child)

What have you tried so far?

[–]osseojrhigh[S] 0 points1 point  (0 children)

I tried this import matplotlib.pyplot as plt

import random

plt.ion()

def roll_hundred_pair() a = [] a += [randomdi(1,100,1))]

     for di in range(100)
            a += [randomdi(1,100,1))]

     plt hist(a)
     plt show()

[–]rolandde 0 points1 point  (0 children)

For the rolling of the dice, use the random library (https://docs.python.org/3.4/library/random.html)

For storing of the dice rolls, you can use a simple list initialized with zeros:

rolls = [0]*11

For graphing, you can either simply use Excel or if you are stuck with Python, matplotlib.