Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

USE MATLAB ONLY. PLEASE TRY TO USE FOR/WHILE LOOPS, IF STATEMENTS, OR VECTORS. THANK YOU! COP2271 MATLAB HW8 Table 1: Yatzy scoring system Name Description

USE MATLAB ONLY. PLEASE TRY TO USE FOR/WHILE LOOPS, IF STATEMENTS, OR VECTORS. THANK YOU!

image text in transcribedimage text in transcribed

COP2271 MATLAB HW8 Table 1: Yatzy scoring system Name Description Chance Any 6 dice Three Pairs Three pairs of different values Small Straight (4) At least 4 sequential dice Large Straight (5) At least 5 sequential dice Maxiyatzy Six of a kind Points Sum of all dice 35 points 40 points 50 points 100 points Sample Output The following test cases do not cover all possible scenarios develop your own!) but should indicate if your code is on the right track: Test Case 1: Enter your 6 dice: [5 6 1 1 5 6] Chance: 24 points Three pairs: 35 points Small Straight (4): 0 points Large Straight (5): 0 points Maxiyatzy: 0 points Test Case 2: Enter your 6 dice: [5 3 4 1 2 1] Chance: 16 points Three pairs: O points Small Straight (4): 40 points Large Straight (5): 50 points Maxiyatzy: 0 points Test Case 3: Enter your 6 dice: [4 4 4 4 4 4] Chance: 24 points Three pairs: 0 points Small Straight (4): O points Large Straight (5): 0 points Maxiyatzy: 100 points COP2271 MATLAB HW8 Test Case 4: Enter your 6 dice: [2 2 4 5 3 3] Chance: 19 points Three pairs: 0 points Small Straight (4): 40 points Large Straight (5): O points Maxiyatzy: 0 points Test Case 5: Enter your 6 dice: [2 2 6 6 5 4] Chance: 25 points Three pairs: O points Small Straight (4): 0 points Large Straight (5): 0 points Maxiyatzy: 0 points Test Case 6: Enter your 6 dice: [2 2 2 3 3 4] Chance: 16 points Three pairs: 0 points Small Straight (4): 0 points Large Straight (5): 0 points Maxiyatzy: 0 points Test Case 7: Enter your 6 dice: [6 6 1 2 4 3] Chance: 22 points Three pairs: O points Small Straight (4): 40 points Large Straight (5): 0 points Maxiyatzy: 0 points Test Case 8: Enter your 6 dice: 1 2 3 5 6 6] Chance: 23 points Three pairs: 0 points Small Straight (4): 0 points Large Straight (5): 0 points Maxiyatzy: 0 points

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

Expert Oracle Database Architecture

Authors: Thomas Kyte, Darl Kuhn

3rd Edition

1430262990, 9781430262992

More Books

Students also viewed these Databases questions

Question

4. What actions should Bouleau & Huntley take now?

Answered: 1 week ago