It's not right for us to write this whole code for you, but we can give you pointers. Open a new question if you get stuck (and try to be more specific in future! Broken code is better than missing code!).
rollDie returns an array with the number of rolls for each of 1 to 6, so start by creating that array, called rolls. Before any die has been rolled what should the array be initialised to? Set it to that value.
- Now we need to simulate rolling a die 1000 times. So, write some code that will do the same thing 1000 times.
- The thing that must be done 1000 times is a simulated dice roll. This is like a random number from 1 to 6. Write code that does that, and stores the result in a variable called
roll.
- Before we leave the looped code, we need to use
roll to make some change to the value we're returning (rolls). What effect does each roll have on rolls? Write the code for that (and remember that Python arrays are indexed from 0).
- Now, we've simulated the dice rolls and gathered the results, we just have to return them to whoever called our function.