Question: Please post written or typed script from MATLAB Write a script that will play a single game of what I call dumb Yahtzee. In this
Please post written or typed script from MATLAB
Write a script that will play a single game of what I call "dumb Yahtzee". In this game, you will roll 5 dice on each turn. You will start with zero points. For your first turn, you add up the total of all dice that show a 1 and add this to your total score. For your second turn, you add the total of all dice that show a 2, You will take 6 turns. Print the final score to the command window at the end of the game. For instance, on turn 3, you roll: 14363 There are two 3's on this roll resulting in 2 x 3 = 6 points added to your total score. Hint - The MATLAB function randi (6,1) will simulate the rolling of one 6-sided dice. The function randi (6,1,5) will roll 5 of these dices. (I know, the plural is dice and the singular is die. But I don't want to confuse anyone here with my fancy East Coast grammar.)
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
