Cody

Problem 13. Remove all the consonants

Solution 1388433

Submitted on 20 Dec 2017 by Bailey Horton
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
s1 = 'Jack and Jill went up the hill'; s2 = 'a a i e u e i'; assert(isequal(s2,refcn(s1)))

length1 = 30 consonants = 'bcdfghjklmnpqrstvwxyzBCDFGHJKLMNPQRSTVWXYZ' j = 0 j = 1 s2 = 'a' j = 2 s2 = 'a ' j = 3 s2 = 'a a' j = 4 s2 = 'a a ' j = 5 s2 = 'a a i' j = 6 s2 = 'a a i ' j = 7 s2 = 'a a i e' j = 8 s2 = 'a a i e ' j = 9 s2 = 'a a i e u' j = 10 s2 = 'a a i e u ' j = 11 s2 = 'a a i e u e' j = 12 s2 = 'a a i e u e ' j = 13 s2 = 'a a i e u e i'

2   Pass
s1 = 'I don''t want to work. I just want to bang on the drum all day.'; s2 = 'I o'' a o o. I u a o a o e u a a.'; assert(isequal(s2,refcn(s1)))

length1 = 62 consonants = 'bcdfghjklmnpqrstvwxyzBCDFGHJKLMNPQRSTVWXYZ' j = 0 j = 1 s2 = 'I' j = 2 s2 = 'I ' j = 3 s2 = 'I o' j = 4 s2 = 'I o'' j = 5 s2 = 'I o' ' j = 6 s2 = 'I o' a' j = 7 s2 = 'I o' a ' j = 8 s2 = 'I o' a o' j = 9 s2 = 'I o' a o ' j = 10 s2 = 'I o' a o o' j = 11 s2 = 'I o' a o o.' j = 12 s2 = 'I o' a o o. ' j = 13 s2 = 'I o' a o o. I' j = 14 s2 = 'I o' a o o. I ' j = 15 s2 = 'I o' a o o. I u' j = 16 s2 = 'I o' a o o. I u ' j = 17 s2 = 'I o' a o o. I u a' j = 18 s2 = 'I o' a o o. I u a ' j = 19 s2 = 'I o' a o o. I u a o' j = 20 s2 = 'I o' a o o. I u a o ' j = 21 s2 = 'I o' a o o. I u a o a' j = 22 s2 = 'I o' a o o. I u a o a ' j = 23 s2 = 'I o' a o o. I u a o a o' j = 24 s2 = 'I o' a o o. I u a o a o ' j = 25 s2 = 'I o' a o o. I u a o a o e' j = 26 s2 = 'I o' a o o. I u a o a o e ' j = 27 s2 = 'I o' a o o. I u a o a o e u' j = 28 s2 = 'I o' a o o. I u a o a o e u ' j = 29 s2 = 'I o' a o o. I u a o a o e u a' j = 30 s2 = 'I o' a o o. I u a o a o e u a ' j = 31 s2 = 'I o' a o o. I u a o a o e u a a' j = 32 s2 = 'I o' a o o. I u a o a o e u a a.'

Suggested Problems

More from this Author95

Community Treasure Hunt

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

Start Hunting!