Question: Write a function roll _ 2 _ dice which generates a simulation ( with a specified seed ) of two dice, take sum of them,

Write a function roll_2_dice which generates a simulation (with a specified seed) of two dice, take sum of them, and return sum in a row vector .
Inputs: N, seed
Output: d, which is 1* N vector
Example:
d= roll_2_dice(1,3000)
Here N=1. It means roll 2 dice once(N=1) and sum (lets say 3+4=7) will be returned in a row vector [7]

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!