image_output_1.png
import random

import seaborn as sns

import random
import matplotlib
import matplotlib.pyplot as plt
def throw():
    global x
    x += random.randint(1, 6)
def multi_throw(dice_amount, list_name):
    global x
    x = 0
    for i in range(dice_amount):
        throw()
    list_name.append(x)
def multi_times(time_amount, dice_amount, list_name):
    for i in range(time_amount):
        multi_throw(dice_amount, list_name)

x = 0
th_amount = 1000000
my_list1 = []
my_list2 = []
my_list3 = []
my_list4 = []
multi_times(th_amount, 3, my_list1)
multi_times(th_amount, 4, my_list2)
multi_times(th_amount, 5, my_list3)
multi_times(th_amount, 6, my_list4)

import seaborn as sns
sns.distplot(my_list1, kde=False)