install pygal with pip (if you haven' used pip yetsee "installing python packages with pipon page on linux and os xthis should be something likepip install --user pygal on windowsthis should bepython - pip install --user pygal you may need to use the command pip instead of pipand if the command still doesn' work you may need to leave off the --user flag note the pygal gallery to see what kind of visualizations are possible with pygalvisit the gallery of chart typesgo to chart types each example includes source codeso you can see how the visualizations are generated creating the die class here' class to simulate the roll of one diedie py from random import randint class die()""" class representing single die "" def __init__(selfnum_sides= )"""assume six-sided die ""self num_sides num_sides def roll(self)""""return random value between and number of sides ""return randint( self num_sidesthe __init__(method takes one optional argument with this classwhen an instance of our die is createdthe number of sides will always be six if no argument is included if an argument is includedthat value is used to set the number of sides on the die (dice are named for their number of sidesa six-sided die is an eight-sided die is and so on the roll(method uses the randint(function to return random number between and the number of sides this function can return the starting value ( )the ending value (num_sides)or any integer between the two