Cody

Problem 1069. Phoneword Translator

Solution 1769988

Submitted on 2 Apr 2019 by Abdelfatah Teamah
• Size: 7
• This is the leading solution.
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
assert(isequal(phoneword2number('1-800-COLLECT'),[1 8 0 0 2 6 5 5 3 2 8]))

[Warning: Function assert has the same name as a MATLAB builtin. We suggest you rename the function to avoid a potential name conflict.] [> In unix (line 32) In phoneword2number (line 2) In ScoringEngineTestPoint1 (line 1) In solutionTest (line 3)]

2   Pass
assert(isequal(phoneword2number('1-800-CONTACTS'),[1 8 0 0 2 6 6 8 2 2 8 7]))

[Warning: Function assert has the same name as a MATLAB builtin. We suggest you rename the function to avoid a potential name conflict.] [> In unix (line 32) In phoneword2number (line 2) In ScoringEngineTestPoint2 (line 1) In solutionTest (line 5)]

3   Pass
assert(isequal(phoneword2number('1800FLOWERS'),[1 8 0 0 3 5 6 9 3 7 7]))

[Warning: Function assert has the same name as a MATLAB builtin. We suggest you rename the function to avoid a potential name conflict.] [> In unix (line 32) In phoneword2number (line 2) In ScoringEngineTestPoint3 (line 1) In solutionTest (line 7)]

4   Pass
assert(isequal(phoneword2number('800-BUSINESS'),[8 0 0 2 8 7 4 6 3 7 7]))

[Warning: Function assert has the same name as a MATLAB builtin. We suggest you rename the function to avoid a potential name conflict.] [> In unix (line 32) In phoneword2number (line 2) In ScoringEngineTestPoint4 (line 1) In solutionTest (line 9)]