frequency results count(valuefrequencies append(frequencyvisualize the results hist pygal bar( hist title "results of rolling two dice times hist x_labels [' '' '' '' '' '' '' '' '' '' '' 'hist x_title "resulthist y_title "frequency of resulthist add(' 'frequencieshist render_to_file('dice_visual svg'after creating two instances of diewe roll the dice and calculate the sum of the two dice for each roll the largest possible result ( is the sum of the largest number on both dicewhich we store in max_result the smallest possible result ( is the sum of the smallest number on both dice when we analyze the resultswe count the number of results for each value between and max_result (we could have used range( )but this would work only for two dice when modeling real-world situationsit' best to write code that can easily model variety of situations this code allows us to simulate rolling pair of dice with any number of sides when creating the chartwe update the title and the labels for the -axis and data series (if the list x_labels were much longerit would make sense to write loop to generate this list automatically after running this coderefresh the tab in your browser showing the chartyou should see chart like the one in figure - figure - simulated results of rolling two six-sided dice times