+ 2

Im trying a Vowel Counter. Where is my error?

Its in the Code Coach. The only case that failed the test is "Is there any life on Mars? " It displaying number 6 instead of 7 vowels there. https://code.sololearn.com/c37whW7Ig0Ix/?ref=app

29th Aug 2020, 11:18 PM
Xtron135
Xtron135 - avatar
6 Answers
+ 5
You didn't check for uppercased vowels. Xtron135 It's ok. You are welcome
29th Aug 2020, 11:46 PM
Kevin ★
+ 2
int size = input.length(); Without adding one
29th Aug 2020, 11:34 PM
Ruba Kh
Ruba Kh - avatar
+ 2
Kevin ★ owh yeahhhh.. how come i forgot about that. Thanks so much.
29th Aug 2020, 11:52 PM
Xtron135
Xtron135 - avatar
+ 1
Ruba Kh did it. Still same. Idk what the special of that phrase "Is there any life on Mars?". Even without the question mark, the result still 6 instead of 7. Haha Its not the matter of the length of the input. Ive tried longer phrase and it works well.
29th Aug 2020, 11:48 PM
Xtron135
Xtron135 - avatar
+ 1
You are right my bad
29th Aug 2020, 11:56 PM
Ruba Kh
Ruba Kh - avatar
+ 1
I don't see any problem with the code. For " Is there any life on mars?", there are 8 vowels (I, e, e, a, i, e, o, a) as output by the code.
30th Aug 2020, 12:27 AM
boonga
boonga - avatar