Write a program that simulates the rolling of two dice.The program should use ra
ID: 3643700 • Letter: W
Question
Write a program that simulates the rolling of two dice.The program should use rand to roll the first die andshould use rand again to roll the second die. Thesum of the two values should then be calculated.[note: since eachdie can show an integer value from 1 to 6, then the sum of the twovalues vary from 2 to 12, with 7 being the most frequent sum and 2and 12 the least frequent sums.] show the 36 possible combinationsof the two dice. your program should roll the two dice 36,000times. Use a single-subscripted array to tall the numbers of timeseach possible sum appears. PRint the results in tabular from. onesixth of all rolls should be 7.should look like this
1 2 3 4 5 6
1 2 3 4 5 6 7
2 3 4 5 6 7 8
3 4 5 6 7 8 9
4 5 6 7 8 9 10
5 6 7 8 9 10 11
6 7 8 9 10 11 12