Cody

Problem 45347. Cat's paw - 01

Solution 2192389

Submitted on 4 Apr 2020
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
a={'meaw','meao-meao','mew'}; assert(isequal( cats_paw(a),'dgkswy'))

tiles = 'abcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyz' ans = 'a' ans = 'a' ans = 'a'

Output argument "out" (and maybe others) not assigned during call to "cats_paw". Error in Test1 (line 2) assert(isequal( cats_paw(a),'dgkswy'))

2   Fail
a={'meaw','meao-meao','mew','meawww'} assert(isequal( cats_paw(a),'dgkswych'))

a = 1×4 cell array {'meaw'} {'meao-meao'} {'mew'} {'meawww'} tiles = 'abcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyz' ans = 'a' ans = 'a' ans = 'a' ans = 'a'

Output argument "out" (and maybe others) not assigned during call to "cats_paw". Error in Test2 (line 2) assert(isequal( cats_paw(a),'dgkswych'))

3   Fail
a={'mew','meawww','mew-mew-mew','meawwwww','meawww-mewaww-meaawwww'} assert(isequal( cats_paw(a),'dfjoscgnrm'))

a = 1×5 cell array {'mew'} {'meawww'} {'mew-mew-mew'} {'meawwwww'} {'meawww-mewaww-meaawwww'} tiles = 'abcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyz' ans = 'a' ans = 'a' ans = 'a' ans = 'a' ans = 'a'

Output argument "out" (and maybe others) not assigned during call to "cats_paw". Error in Test3 (line 2) assert(isequal( cats_paw(a),'dfjoscgnrm'))

4   Pass
%a={''}; %assert( isempty(cats_paw(a)))

5   Fail
a={'meaw','','meao-meao','mew','meawww'} assert(isequal( cats_paw(a),'dgkswych'))

a = 1×5 cell array {'meaw'} {0×0 char} {'meao-meao'} {'mew'} {'meawww'} tiles = 'abcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyz' ans = 'a' ans = 'a' ans = 'a' ans = 'a' ans = 'a'

Output argument "out" (and maybe others) not assigned during call to "cats_paw". Error in Test5 (line 2) assert(isequal( cats_paw(a),'dgkswych'))

6   Fail
a={'meawwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwww'} assert(isequal( cats_paw(a),'de'))

a = 1×1 cell array {'meawwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwww'} tiles = 'abcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyz' ans = 'a'

Output argument "out" (and maybe others) not assigned during call to "cats_paw". Error in Test6 (line 2) assert(isequal( cats_paw(a),'de'))

7   Fail
a={'meaw','meao-meao','mew','','','','meawww',''} assert(isequal( cats_paw(a),'dgkswych'))

a = 1×8 cell array {'meaw'} {'meao-meao'} {'mew'} {0×0 char} {0×0 char} {0×0 char} {'meawww'} {0×0 char} tiles = 'abcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyz' ans = 'a' ans = 'a' ans = 'a' ans = 'a' ans = 'a' ans = 'a' ans = 'a' ans = 'a'

Output argument "out" (and maybe others) not assigned during call to "cats_paw". Error in Test7 (line 2) assert(isequal( cats_paw(a),'dgkswych'))

Suggested Problems

More from this Author149

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!