Test | Status | Code Input and Output |
---|---|---|
1 | Pass |
str1 = 'estion-quay';
str2 = 'question';
str1_f = piglatin2english(str1);
assert(strcmp(str1_f,str2))
p =
1×1 cell array
{'estion-quay'}
e =
'question'
|
2 | Pass |
str1 = 'another-ay';
str2 = 'another';
str1_f = piglatin2english(str1);
assert(strcmp(str1_f,str2))
p =
1×1 cell array
{'another-ay'}
e =
'another'
|
3 | Pass |
str1 = 'ix-nay';
str2 = 'nix';
str1_f = piglatin2english(str1);
assert(strcmp(str1_f,str2))
p =
1×1 cell array
{'ix-nay'}
e =
'nix'
|
4 | Pass |
str1 = 'another-ay one-ay ites-bay e-thay ust-day';
str2 = 'another one bites the dust';
str1_f = piglatin2english(str1);
assert(strcmp(str1_f,str2))
p =
1×5 cell array
{'another-ay'} {'one-ay'} {'ites-bay'} {'e-thay'} {'ust-day'}
e =
'another one bites the dust'
|
5 | Pass |
str1 = 'ow-hay uch-may ood-way ould-way a-ay oodchuck-way uck-chay if-ay a-ay oodchuck-way ould-cay uck-chay ood-way';
str2 = 'how much wood would a woodchuck chuck if a woodchuck could chuck wood';
str1_f = piglatin2english(str1);
assert(strcmp(str1_f,str2))
p =
1×13 cell array
Columns 1 through 11
{'ow-hay'} {'uch-may'} {'ood-way'} {'ould-way'} {'a-ay'} {'oodchuck-way'} {'uck-chay'} {'if-ay'} {'a-ay'} {'oodchuck-way'} {'ould-cay'}
Columns 12 through 13
{'uck-chay'} {'ood-way'}
e =
'how much wood would a woodchuck chuck if a woodchuck could chuck wood'
|
6 | Pass |
str1 = 'eter-pay iper-pay icked-pay a-ay eck-pay of-ay ickle-pay eppers-pay';
str2 = 'peter piper picked a peck of pickle peppers';
str1_f = piglatin2english(str1);
assert(strcmp(str1_f,str2))
p =
1×8 cell array
{'eter-pay'} {'iper-pay'} {'icked-pay'} {'a-ay'} {'eck-pay'} {'of-ay'} {'ickle-pay'} {'eppers-pay'}
e =
'peter piper picked a peck of pickle peppers'
|
7 | Pass |
str1 = 'our-fay ore-scay';
str2 = 'four score';
str1_f = piglatin2english(str1);
assert(strcmp(str1_f,str2))
p =
1×2 cell array
{'our-fay'} {'ore-scay'}
e =
'four score'
|
9872 Solvers
Find the two most distant points
1628 Solvers
Return unique values without sorting
588 Solvers
Cell Counting: How Many Draws?
581 Solvers
Natural numbers in string form
347 Solvers
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!