Cody

# Problem 1069. Phoneword Translator

Solution 1921876

Submitted on 4 Sep 2019
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   Fail
assert(isequal(phoneword2number('1-800-COLLECT'),[1 8 0 0 2 6 5 5 3 2 8]))

ans = 1×0 empty double row vector ans = 1×0 empty double row vector ans = 7 12 ans = 1×0 empty double row vector ans = 11 ans = 1×0 empty double row vector ans = 1×0 empty double row vector ans = 1×0 empty double row vector ans = 1×0 empty double row vector ans = 1×0 empty double row vector ans = 1×0 empty double row vector ans = 9 10 ans = 1×0 empty double row vector ans = 1×0 empty double row vector ans = 8 ans = 1×0 empty double row vector ans = 1×0 empty double row vector ans = 1×0 empty double row vector ans = 1×0 empty double row vector ans = 13 ans = 1×0 empty double row vector ans = 1×0 empty double row vector ans = 1×0 empty double row vector ans = 1×0 empty double row vector ans = 1×0 empty double row vector

Output argument "pl" (and maybe others) not assigned during call to "phoneword2number". Error in Test1 (line 1) assert(isequal(phoneword2number('1-800-COLLECT'),[1 8 0 0 2 6 5 5 3 2 8]))

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

ans = 11 ans = 1×0 empty double row vector ans = 7 12 ans = 1×0 empty double row vector ans = 1×0 empty double row vector ans = 1×0 empty double row vector ans = 1×0 empty double row vector ans = 1×0 empty double row vector ans = 1×0 empty double row vector ans = 1×0 empty double row vector ans = 1×0 empty double row vector ans = 1×0 empty double row vector ans = 1×0 empty double row vector ans = 9 ans = 8 ans = 1×0 empty double row vector ans = 1×0 empty double row vector ans = 1×0 empty double row vector ans = 14 ans = 10 13 ans = 1×0 empty double row vector ans = 1×0 empty double row vector ans = 1×0 empty double row vector ans = 1×0 empty double row vector ans = 1×0 empty double row vector

Output argument "pl" (and maybe others) not assigned during call to "phoneword2number". Error in Test2 (line 1) assert(isequal(phoneword2number('1-800-CONTACTS'),[1 8 0 0 2 6 6 8 2 2 8 7]))

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

ans = 1×0 empty double row vector ans = 1×0 empty double row vector ans = 1×0 empty double row vector ans = 1×0 empty double row vector ans = 9 ans = 5 ans = 1×0 empty double row vector ans = 1×0 empty double row vector ans = 1×0 empty double row vector ans = 1×0 empty double row vector ans = 1×0 empty double row vector ans = 6 ans = 1×0 empty double row vector ans = 1×0 empty double row vector ans = 7 ans = 1×0 empty double row vector ans = 1×0 empty double row vector ans = 10 ans = 11 ans = 1×0 empty double row vector ans = 1×0 empty double row vector ans = 1×0 empty double row vector ans = 8 ans = 1×0 empty double row vector ans = 1×0 empty double row vector

Output argument "pl" (and maybe others) not assigned during call to "phoneword2number". Error in Test3 (line 1) assert(isequal(phoneword2number('1800FLOWERS'),[1 8 0 0 3 5 6 9 3 7 7]))

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

ans = 1×0 empty double row vector ans = 5 ans = 1×0 empty double row vector ans = 1×0 empty double row vector ans = 10 ans = 1×0 empty double row vector ans = 1×0 empty double row vector ans = 1×0 empty double row vector ans = 8 ans = 1×0 empty double row vector ans = 1×0 empty double row vector ans = 1×0 empty double row vector ans = 1×0 empty double row vector ans = 9 ans = 1×0 empty double row vector ans = 1×0 empty double row vector ans = 1×0 empty double row vector ans = 1×0 empty double row vector ans = 7 11 12 ans = 1×0 empty double row vector ans = 6 ans = 1×0 empty double row vector ans = 1×0 empty double row vector ans = 1×0 empty double row vector ans = 1×0 empty double row vector

Output argument "pl" (and maybe others) not assigned during call to "phoneword2number". Error in Test4 (line 1) assert(isequal(phoneword2number('800-BUSINESS'),[8 0 0 2 8 7 4 6 3 7 7]))