0

Python.

How to define a function roll_hundred_pair() that produces a histogram of the results of 100 rolls of two 6-sided dice? On python.

16th Jan 2019, 6:40 PM
Carlye
Carlye  - avatar
2 odpowiedzi
+ 1
For the dice rolling you can use random module. For the histogram I would count how many occurences happened for each result, then print that many symbols in a line, like asterisks. That would be easiest in a text terminal. Or for better visualization you can also use other libraries like mathplotlib
16th Jan 2019, 9:34 PM
Tibor Santa
Tibor Santa - avatar
0
Please show us your attempt.
16th Jan 2019, 8:12 PM
Diego
Diego - avatar