Write a function that to sum the result of rolling two random dice n times
<p>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.</p>

<p>I got this for that : </p>

<pre><code>import random

def DiceRoll(n):
    x=[random.randint(1,6) for _ in range(n)]
    return x
</code></pre>

<p>Then,</p>

<p>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.</p>

<p>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. </p>

<p>Unsure of why you want to sum them but here you go! I am sure you are capable of wrapping this in a function!</p>

<pre><code>import random

def DiceRoll(n):
    x=[random.randint(1,6) for _ in range(n)]
    return x

d1 = DiceRoll(12)
d2 = DiceRoll(12)
print sum(d1+d2)
</code></pre>

python sage dice