Question: MATLAB Under and Over 7 is a very simple dice game. It is played with two six-sided dice. The principle of the game is to

MATLAB

Under and Over 7 is a very simple dice game. It is played with two six-sided dice. The principle of the game is to guess whether the value of the dice is lower/higher than or equal to seven. These are the only bets in the game. 1. The game begins with welcoming the player and obtaining their name. 2. The player is given 10 initial bank points at the beginning of each new game 3. The player then chooses how many points to bet . The player can NOT bet 3.1. more points than what they have in the bank, 3.2. zero points 3.3. negative points 4. The player then guesses that their roll will be either UNDER 7, EXACTLY 7 or OVER 7 5. The player then rolls the two six-sided dice 6. The player loses the amount of points in their bet if they guessed incorrectly 7. The player wins bank points if they guessed correctly 7.1. their gain is 1:1 for UNDER 7 and for OVER 7 (e.g. if they bet $1 they will get $1). 7.2. their gain is 1:4 for EXACTLY 7 (e.g. if they bet $1 they will get $4). 8. Game is over in three ways 8.1. the bank points are at least 30. The player wins. 8.2. if the bank points become zero. The player loses. 8.3. if the player chooses to quit this game. The player decides they dont want to finish this game. 9. At the end of each game the player is asked if they want to play a new game or quit altogether

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!