Cody

Solution 1237249

Submitted on 23 Jul 2017 by Salvatore Lacava
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
str = 'a'; score = 1; assert(isequal(scrabble_score(str),score))

p1 = 'eaiounrtls' p2 = 'dg' p3 = 'bcmp' p4 = 'fhvwy' p5 = 'k' p8 = 'jx' p10 = 'qz' v = 1 score = 1

2   Pass
str = 'matlab'; score = 10; assert(isequal(scrabble_score(str),score))

p1 = 'eaiounrtls' p2 = 'dg' p3 = 'bcmp' p4 = 'fhvwy' p5 = 'k' p8 = 'jx' p10 = 'qz' v = 3 score = 3 v = 3 1 score = 4 v = 3 1 1 score = 5 v = 3 1 1 1 score = 6 v = 3 1 1 1 1 score = 7 v = 3 1 1 1 1 3 score = 10

3   Pass
str = 'quetzalcoatl'; score = 32; assert(isequal(scrabble_score(str),score))

p1 = 'eaiounrtls' p2 = 'dg' p3 = 'bcmp' p4 = 'fhvwy' p5 = 'k' p8 = 'jx' p10 = 'qz' v = 10 score = 10 v = 10 1 score = 11 v = 10 1 1 score = 12 v = 10 1 1 1 score = 13 v = 10 1 1 1 10 score = 23 v = 10 1 1 1 10 1 score = 24 v = 10 1 1 1 10 1 1 score = 25 v = 10 1 1 1 10 1 1 3 score = 28 v = 10 1 1 1 10 1 1 3 1 score = 29 v = 10 1 1 1 10 1 1 3 1 1 score = 30 v = 10 1 1 1 10 1 1 3 1 1 1 score = 31 v = 10 1 1 1 10 1 1 3 1 1 1 1 score = 32

4   Pass
str = 'quartz'; score = 24; assert(isequal(scrabble_score(str),score))

p1 = 'eaiounrtls' p2 = 'dg' p3 = 'bcmp' p4 = 'fhvwy' p5 = 'k' p8 = 'jx' p10 = 'qz' v = 10 score = 10 v = 10 1 score = 11 v = 10 1 1 score = 12 v = 10 1 1 1 score = 13 v = 10 1 1 1 1 score = 14 v = 10 1 1 1 1 10 score = 24

5   Pass
str = 'jackal'; score = 19; assert(isequal(scrabble_score(str),score))

p1 = 'eaiounrtls' p2 = 'dg' p3 = 'bcmp' p4 = 'fhvwy' p5 = 'k' p8 = 'jx' p10 = 'qz' v = 8 score = 8 v = 8 1 score = 9 v = 8 1 3 score = 12 v = 8 1 3 5 score = 17 v = 8 1 3 5 1 score = 18 v = 8 1 3 5 1 1 score = 19

Suggested Problems

More from this Author95