Cody

Solution 797017

Submitted on 22 Dec 2015 by Peng Liu
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 = {'hello','there','fellow','matlab','users'}; mult = {{'DW','','','','DL'} {'DW','','','','DL'} {'','DW','','','','DL'} {'','DW','','','','DL'} {'DW','','','','DL'}}; score = 106; assert(isequal(scrabble_scores_4(words,mult),score))

2   Pass
%% words = {'what','do','you','think','of','this','problem'}; mult = {{'','DW','',''}; {'',''}; {'','DW',''}; {'','DW','','','TL'}; {'',''}; {'','DW','',''}; {'TL','','','DW','','','TL'}}; score = 148; assert(isequal(scrabble_scores_4(words,mult),score))

3   Pass
%% words = {'if','you','like','it','please','give','it','a','like'}; mult = {{'','DW'}; {'','','QW'}; {'','DW','',''}; {'',''}; {'','DW','','','TL',''}; {'','DW','',''}; {'TL',''}; {''}; {'DW','','','TL'}}; score = 113; assert(isequal(scrabble_scores_4(words,mult),score))

4   Pass
%% words = {'zither','quandry','flummox','wealthy','amalgam'}; mult = {{'','DW','','','','DW'}; {'QL','','','','','DW',''}; {'','DW','','','','DW',''}; {'','DW','','','','DW',''}; {'','DW','','','','DW',''}; }; score = 368; assert(isequal(scrabble_scores_4(words,mult),score))

5   Pass
%% words = {'heterogeneous','homogenously','concatenate','thusly','hi'}; mult = {{'TL','','','','TL','','','','TW','','','','QW'}; {'','','','TL','','','','TW','','','','QW'}; {'TL','','','','TL','','','','TW','',''}; {'TL','','','','TL',''}; {'',''}; }; score = 690; assert(isequal(scrabble_scores_4(words,mult),score))

6   Pass
%% words = {'perspicacious','yes','zero','quizzical','no'}; mult = {{'TL','','','','TL','','','','TW','','','','QW'}; {'','',''}; {'TL','','',''}; {'TL','','','','TL','','','TW',''}; {'',''}; }; score = 671; assert(isequal(scrabble_scores_4(words,mult),score))

7   Pass
%% pangram test to help ensure letters scores are correctly assigned words = {'the','quick','brown','fox','jumps','over','a','lazy','dog'}; mult = {{'TL','',''}; {'','TL','','',''}; {'TW','','','','QW'}; {'','',''}; {'TL','','','','QL'}; {'TL','','',''}; {'TL'}; {'','','TW',''}; {'','','QW'}; }; score = 278; assert(isequal(scrabble_scores_4(words,mult),score))