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))
|
How to find the position of an element in a vector without using the find function
2321 Solvers
Equidistant numbers containing certain value in an interval
70 Solvers
Make a random, non-repeating vector.
1117 Solvers
631 Solvers
Replace multiples of 5 with NaN
282 Solvers