Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Write a MatLab code for Over 7 and under 7 using the provided instructions and commands Simple Dice Games Graphics Options: Save the Dice.mat file

Write a MatLab code for Over 7 and under 7 using the provided instructions and commands image text in transcribed
Simple Dice Games Graphics Options: Save the Dice.mat file to your current MATLAB directory. load Dice; % Loads cell array (1x6) of dice images >> roll: randi( [1 6] J1 21) % Random roll of 2 dice-only allow values from 1 to 6 roll 5 >> imshow( [ Dice(roll) ] ); % Displays the roll graphically for user 1. The game is played with two dice 2. The player specifies how much money he/she is betting on the roll 3. The player bets whether he/she will roll Under 7,Over 7, or Exactly7 4 The player specifies how much money he/she is betting on the roll 5. The player rolls the dice 6. If the player bets incorrectly, he/she loses the amount of money in the bet 7. If the player bets correctly, the payoff is 1:1 for Under 7 and for Over 7 (that is, if the bet was SI then the player wins $1) and is 4:1 for Exactly 7 (that is, if the bet was SI then the player wins $4 for betting on and successfully rollimg a 7), Player can start game with any amount of money, and can bet any amount (

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

Transactions On Large Scale Data And Knowledge Centered Systems Vi Special Issue On Database And Expert Systems Applications Lncs 7600

Authors: Abdelkader Hameurlain ,Josef Kung ,Roland Wagner ,Stephen W. Liddle ,Klaus-Dieter Schewe ,Xiaofang Zhou

2012th Edition

3642341780, 978-3642341786

More Books

Students also viewed these Databases questions

Question

Explain the causes of indiscipline.

Answered: 1 week ago

Question

Explain the factors influencing wage and salary administration.

Answered: 1 week ago