Cody

Solution 704056

Submitted on 21 Jul 2015 by James
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   Pass
%% 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))

ans = 106 ans = 148

2   Pass
%% 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))

ans = 113

3   Pass
%% 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))

ans = 368

4   Pass
%% 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))

ans = 690

5   Pass
%% 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))

ans = 671

6   Pass
%% 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))

ans = 278

7   Pass
%% 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))

ans = 690

8   Pass
%% 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))

ans = 690

Suggested Problems

More from this Author161