Write a function DiceRoll(n) that inputs an integer n and produces n random numbers between 1 and 6. Test your program for n = 12.
I got this for that :
import random
def DiceRoll(n):
x=[random.randint(1,6) for _ in range(n)]
return x
Then,
Write a function TwoDiceRoll(n) that uses your function DiceRoll to sum the result of rolling two random dice n times. Test your program for n = 12.
I do not have an idea how would I involve my DiceRoll function in order to get the sum. Would someone be able to help me out.