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 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
Get step-by-step solutions from verified subject matter experts
