Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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

image text in transcribedimage text in transcribedplease 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

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Beyond Big Data Using Social MDM To Drive Deep Customer Insight

Authors: Martin Oberhofer, Eberhard Hechler

1st Edition

0133509796, 9780133509793

More Books

Students also viewed these Databases questions

Question

State the allowable forms of organization a CPA firm may assume.

Answered: 1 week ago

Question

What is the difference between Needs and GAP Analyses?

Answered: 1 week ago

Question

What are ERP suites? Are HCMSs part of ERPs?

Answered: 1 week ago