Question: please help with this code, only if you know how to do it 100% Dice game A game rolls a die 10 times and counts

please help with this code, only if you know how to doit 100% Dice game A game rolls a die 10 times andplease help with this code, only if you know how to do it 100%

Dice game A game rolls a die 10 times and counts how many times the number 5 or 6 shows up. If there are . a total of seven or more times, the win is 2 dollars . a total of four or more times but less than seven, the win is 1 dollars . a total of three or less, the win is 0 dollars Write a function called payOut that has an input row array of 10 integers representing the ten rolls of dice, and calculates the pay out. For example: >>tenRollsOfDice-randi(6,1,10) >payOut- diceGame( tenRollsofDice) tenRollsOfDice - 4 4 payout = Your Function Save C Reset MATLAB Documentation 1 function payOut- diceGame( rolls) % Your code goes here % 4 5 end Code to call your function C Reset 1 tenRollsOfDice - randi(6,1,10) 2 payOutdiceGame( tenRollsofDice) Run Function Feedback

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!