Test | Status | Code Input and Output |
---|---|---|
1 | Pass |
str = 'a';
score = 1;
assert(isequal(scrabble_score(str),score))
ans =
Columns 1 through 16
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
Columns 17 through 32
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
Columns 33 through 48
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
Columns 49 through 64
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
Columns 65 through 80
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
Columns 81 through 96
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
Columns 97 through 112
1 3 3 2 1 4 2 4 1 8 5 1 3 1 1 3
Columns 113 through 122
10 1 1 1 1 4 4 8 4 10
|
2 | Pass |
str = 'matlab';
score = 10;
assert(isequal(scrabble_score(str),score))
ans =
Columns 1 through 16
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
Columns 17 through 32
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
Columns 33 through 48
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
Columns 49 through 64
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
Columns 65 through 80
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
Columns 81 through 96
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
Columns 97 through 112
1 3 3 2 1 4 2 4 1 8 5 1 3 1 1 3
Columns 113 through 122
10 1 1 1 1 4 4 8 4 10
|
3 | Pass |
str = 'quetzalcoatl';
score = 32;
assert(isequal(scrabble_score(str),score))
ans =
Columns 1 through 16
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
Columns 17 through 32
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
Columns 33 through 48
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
Columns 49 through 64
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
Columns 65 through 80
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
Columns 81 through 96
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
Columns 97 through 112
1 3 3 2 1 4 2 4 1 8 5 1 3 1 1 3
Columns 113 through 122
10 1 1 1 1 4 4 8 4 10
|
4 | Pass |
str = 'quartz';
score = 24;
assert(isequal(scrabble_score(str),score))
ans =
Columns 1 through 16
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
Columns 17 through 32
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
Columns 33 through 48
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
Columns 49 through 64
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
Columns 65 through 80
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
Columns 81 through 96
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
Columns 97 through 112
1 3 3 2 1 4 2 4 1 8 5 1 3 1 1 3
Columns 113 through 122
10 1 1 1 1 4 4 8 4 10
|
5 | Pass |
str = 'jackal';
score = 19;
assert(isequal(scrabble_score(str),score))
ans =
Columns 1 through 16
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
Columns 17 through 32
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
Columns 33 through 48
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
Columns 49 through 64
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
Columns 65 through 80
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
Columns 81 through 96
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
Columns 97 through 112
1 3 3 2 1 4 2 4 1 8 5 1 3 1 1 3
Columns 113 through 122
10 1 1 1 1 4 4 8 4 10
|
3238 Solvers
1800 Solvers
516 Solvers
223 Solvers
393 Solvers
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!