This program demonstrates how to use an ARRAY to save multiple dice rolls, The array is rolls[].
Loops are used to examine the dice, in this case adding up the total of the dice.
The advantage of using an ARRAY is that it is very easy to change the program to roll any number of dice.
View and make a copy of diceRolls.py from replit and run the program.
Task 1
You are going to use a Nested For Loop. See openbookproject.
At present the user chooses the number of dice to roll.
Edit the program and add an outer loop, so that you can also choose how many times to to roll the dice
Append all the numbers to one list
Screenshot of desired output
Task 2
For each roll of the chosen number of dice, oneRoll should be recorded
OneRoll will be outside the inner loop
Sum each roll of the dice separately after each roll printing the total
Screenshot of desired output
Task 3
Check if each roll was greater than 20
Check what fraction of rolls of the total this was
Screenshot of desired output