Random Numbers 3.20 Many games require the player to roll two dice. The number on each die can vary from 1 to 6. (a) Use the rand function in combination with a rounding function to cre- ate a simulation of one roll of one die. (b) Use your results from part (a) to create a simulation of the value rolled with a second die. (c) Add your two results to create a value representing the total rolled dur ing each turn. (d) Use your program to determine the values rolled in a favorite board game, or use the game shown in Figure P3.20. Co n ra dociering a container to ship sensitive medical materials Step (a) Many games require the player to roll two dice. The number on each die can vary from 1 to 6. The following is the MATLAB program we can create a simulation of one roll of one die by using the rand function with a rounding function. r=0; rl=round(rand(1,1)*5+1) Output: Here the output is a single value. We will get the values from 1 to 6 as we execute the above code many times. Step 2 DO (b) The following is the MATLAB program that uses the results from the part(a) to create a simulation of the value rolled with a second die. r=5; r2=round(rand(1,1)*5+1) Output: r2 = Here the output is a single value. We will get the values from 1 to 6 as we execute the above code many times. Random Numbers 3.20 Many games require the player to roll two dice. The number on each die can vary from 1 to 6. (a) Use the rand function in combination with a rounding function to cre- ate a simulation of one roll of one die. (b) Use your results from part (a) to create a simulation of the value rolled with a second die. (c) Add your two results to create a value representing the total rolled dur ing each turn. (d) Use your program to determine the values rolled in a favorite board game, or use the game shown in Figure P3.20. Co n ra dociering a container to ship sensitive medical materials Step (a) Many games require the player to roll two dice. The number on each die can vary from 1 to 6. The following is the MATLAB program we can create a simulation of one roll of one die by using the rand function with a rounding function. r=0; rl=round(rand(1,1)*5+1) Output: Here the output is a single value. We will get the values from 1 to 6 as we execute the above code many times. Step 2 DO (b) The following is the MATLAB program that uses the results from the part(a) to create a simulation of the value rolled with a second die. r=5; r2=round(rand(1,1)*5+1) Output: r2 = Here the output is a single value. We will get the values from 1 to 6 as we execute the above code many times