Problem 13. Remove all the consonants
Remove all the consonants in the given phrase.
Example:
Input s1 = 'Jack and Jill went up the hill'; Output s2 is 'a a i e u e i';
Solution Stats
Problem Comments
-
17 Comments
I agree with the comments below, the test suite does not match the problem description.
Agreed.
Fixing and rescoring. Sorry about the confusion.
Though I think technically the problem description is correct, it would be much more understandable if you show what to do with punctuation as well.
Also, from the example it is not clear what one should do if two vowels exists in one word. Since it is not asked in the test-suite, maybe note explicitly that you can assume that every word will have one vowel at the most.
interesting
http://www.oxforddictionaries.com/words/is-the-letter-y-a-vowel-or-a-consonant
In the answer, spaces separate remaining characters except when preceeding punctuation!
I keep getting "There was an issue submitting your solution. Remove inappropriate content." No idea why.
This is just a "corollary" to the problem of removing vowels (with the same sample sentence!)
Brian Butler the spaces in the original sentence were included in the new sentence. It just seems the way you said it due to there being one vowel per word in the original.
I after 500 like i gave up but could distinguish between the two, I just wrote if and else and typed the thing. That counts right. XD I have no clue. lol I turned them into a double into a double figured out ' = 39 , space = 32 . = 46, It started Numbers = double(s1); Then I made vow = double(['AaEeIiOoUu.','''']) nothing wrong with that stuff. First one easy. The periods and little squirt marks in the second one. DX so stuck. Should I break it in two at the squirts and just make 2 strings. That's what I am thinking. It seem to have a mind of its own in the current form. It is just the spaces.
More test cases could be added as well. Such as if the sentence includes numbers, whitespaces, e.t.c.
i hate this problem
After executing the the input string
s1 = 'I don''t want to work. I just want to bang on the drum all day.'
it is reading as single quote at "don''t " word but in the result both quotes are shown how it is possible????
The vowels to retain here are, 'a e i o u'. There appears to be confusion for some.
To solve this question, the best way is to delete consonants rather than to find 'a e i o u' and other things.
To be honest, although I know why there are two ' in the second test, I don't know how to detect it.
So, I give up and I choose to delete consonants. /(ㄒoㄒ)/~~
@mustafizur because you are not doing what is being asked
Solution Comments
Show commentsProblem Recent Solvers4088
Suggested Problems
-
1911 Solvers
-
Find state names that start with the letter N
1242 Solvers
-
What is the distance from point P(x,y) to the line Ax + By + C = 0?
450 Solvers
-
Given a window, how many subsets of a vector sum positive
854 Solvers
-
We love vectorized solutions. Problem 1 : remove the row average.
826 Solvers
More from this Author96
Problem Tags
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!