Cody

# Problem 3081. Scrabble Scores - 4

Solution 597105

Submitted on 17 Mar 2015
This solution is locked. To view this solution, you need to provide a solution of the same size or smaller.

### Test Suite

Test Status Code Input and Output
1   Fail
% words = {'hello','there','fellow','matlab','users'}; mult = {'D d','D d',' D d',' D d','D d'}; score = 106; assert(isequal(scrabble_scores_4_rev(words,mult),score))

Error: A and B must be same size.

2   Fail
%% words = {'what','do','you','think','of','this','problem'}; mult = {' D ',' ',' D ',' D t',' ',' D ','t D t'}; score = 148; assert(isequal(scrabble_scores_4_rev(words,mult),score))

Error: A and B must be same size.

3   Fail
%% words = {'if','you','like','it','please','give','it','a','like'}; mult = {' D',' Q',' D ',' ',' D t ',' D ','t ',' ','D t'}; score = 113; assert(isequal(scrabble_scores_4_rev(words,mult),score))

Error: A and B must be same size.

4   Fail
%% words = {'zither','quandry','flummox','wealthy','amalgam'}; mult = {' D D','q D ',' D D ',' D D ',' D D '}; score = 368; assert(isequal(scrabble_scores_4_rev(words,mult),score))

Error: A and B must be same size.

5   Fail
%% words = {'heterogeneous','homogenously','concatenate','thusly','hi'}; mult = {'t t T Q',' t T Q','t t T ','t t ',' '}; score = 690; assert(isequal(scrabble_scores_4_rev(words,mult),score))

Error: A and B must be same size.

6   Fail
%% words = {'perspicacious','yes','zero','quizzical','no'}; mult = {'t t T Q',' ','t ','t t T ',' '}; score = 671; assert(isequal(scrabble_scores_4_rev(words,mult),score))

Error: A and B must be same size.

7   Fail
%% pangram test to help ensure letters scores are correctly assigned words = {'the','quick','brown','fox','jumps','over','a','lazy','dog'}; mult = {'t ',' t ','T Q',' ','t q','t ','t',' T ',' Q'}; score = 278; assert(isequal(scrabble_scores_4_rev(words,mult),score))

Error: A and B must be same size.

8   Fail
%% anti-cheating case ind = randi(4); switch ind case 1 words = {'hello','there','fellow','matlab','users'}; mult = {'D d','D d',' D d',' D d','D d'}; score = 106; case 2 words = {'if','you','like','it','please','give','it','a','like'}; mult = {' D',' Q',' D ',' ',' D t ',' D ','t ',' ','D t'}; score = 113; case 3 words = {'heterogeneous','homogenously','concatenate','thusly','hi'}; mult = {'t t T Q',' t T Q','t t T ','t t ',' '}; score = 690; case 4 words = {'the','quick','brown','fox','jumps','over','a','lazy','dog'}; mult = {'t ',' t ','T Q',' ','t q','t ','t',' T ',' Q'}; score = 278; end assert(isequal(scrabble_scores_4_rev(words,mult),score))

Error: A and B must be same size.

9   Fail
%% anti-cheating case ind = randi(4); switch ind case 1 words = {'what','do','you','think','of','this','problem'}; mult = {' D ',' ',' D ',' D t',' ',' D ','t D t'}; score = 148; case 2 words = {'perspicacious','yes','zero','quizzical','no'}; mult = {'t t T Q',' ','t ','t t T ',' '}; score = 671; case 3 words = {'heterogeneous','homogenously','concatenate','thusly','hi'}; mult = {'t t T Q',' t T Q','t t T ','t t ',' '}; score = 690; case 4 words = {'zither','quandry','flummox','wealthy','amalgam'}; mult = {' D D','q D ',' D D ',' D D ',' D D '}; score = 368; end assert(isequal(scrabble_scores_4_rev(words,mult),score))

Error: A and B must be same size.