- You will ask the user for the number of rolls to simulate. You will then roll two dice per roll. Use the random library and the randint function therein (random.randint(1,6)) for each dice.

- Add the numbers from each dice, and keep a count of each possible roll (2-12), and how many times you roll “doubles” (the same number on both dice).

- Print out each dice count, the number of rolls for that dice count, and the percentage of the total:

Enter the number of rolls: 10000

2 - 266 2.660000%

3 - 580 5.800000%

4 - 881 8.810000%

5 - 1086 10.860000%

6 - 1418 14.180000%

7 - 1658 16.580000%

8 - 1363 13.630000%

9 - 1096 10.960000%

10 - 829 8.290000%

11 - 550 5.500000%

12 - 273 2.730000%

Doubles - 1425 - 14.234000%

This is the start of my code.

I may be doing this completely wrong.

any feedback helps!

Very lost!

import random #randint def main(): rolls = input("Enter the number of rolls:") total2 = 0 total3 = 0 total4 = 0 total5 = 0 total6 = 0 total7 = 0 total8 = 0 total9 = 0 total10 = 0 total11 = 0 total12 = 0 t2 = 0 t3 = 0 t4 = 0 t5 = 0 t6 = 0 t7 = 0 t8 = 0 t9 = 0 t10 = 0 t11 = 0 t12 = 0 dice1 = random.randint(1,6) dice2 = random.randint(1,6) randomNumGen(dice1, dice2, total2, total3, total4, total5, total6, total7, total8, total9, total10, total11, total12) text(t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12) def randomNumGen(dice1, dice2, total2, total3, total4, total5, total6, total7, total8, total9, total10, total11, total12): if dice1 + dice2 == 2: t2 = total2 + (dice1 + dice2) return t2 elif (dice1 + dice2) == 3: t3 = total3 + (dice1 + dice2) return t3 elif (dice1 + dice2) == 4: t4 = total3 + (dice1 + dice2) return t4 elif (dice1 + dice2) == 5: t5 = total3 + (dice1 + dice2) return t5 elif (dice1 + dice2) == 6: t6 = total3 + (dice1 + dice2) return t6 elif (dice1 + dice2) == 7: t7 = total3 + (dice1 + dice2) return t7 elif (dice1 + dice2) == 8: t8 = total3 + (dice1 + dice2) return t8 elif (dice1 + dice2) == 9: t9 = total3 + (dice1 + dice2) return t9 elif (dice1 + dice2) == 10: t10 = total3 + (dice1 + dice2) return t10 elif (dice1 + dice2) == 11: t11 = total3 + (dice1 + dice2) return t11 elif (dice1 + dice2) == 12: t12 = total3 + (dice1 + dice2) return t12 def text(t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12): print("2 - ", t2) print("3 - ", t3) print("4 - ", t4) print("5 - ", t5) print("6 - ", t6) print("7 - ", t7) print("8 - ", t8) print("9 - ", t9) print("10 - ",t10) print("11 - ", t11) print("12 - ", t12) main()