I need help! [ ANSWERED] | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
0

I need help! [ ANSWERED]

I AM TRYING TO MAKE A CODe THAt TELLS HOW MANY VOWELS ARE IN A STRING. I HAVE BEEN TRYING FOR OVER 2 DAYS. PLEASE HELP! SoRRY FOR CAPS, MY KEYBOARD IS BROKEN. LiNK: https://code.sololearn.com/cRMphEIxayCa/?ref=app

13th May 2020, 10:00 AM
Pr0C0d3r
Pr0C0d3r - avatar
5 Answers
+ 4
Pr0C0d3r You should do counter += 1 check like this if (list[i])=="a" or list[i] == "e" or list[i] == "i" or list[i] == "o" or list[i] == "u": counter+=1 i+=1
13th May 2020, 10:05 AM
A͢J
A͢J - avatar
+ 1
https://code.sololearn.com/c1OIr0OwCmdi/?ref=app or just add a list of vowels at the top and an if statement in your while loop to check em. Both work
13th May 2020, 10:13 AM
Slick
Slick - avatar
+ 1
THATS SOMETHING NEW.... THNAKS FOR THE CODE! BUT I ALREADY USED THE OTHER ONE. BUT IT IS A REALLY NICE CODE! THANKS, AND SORRY FOR CAPS.
13th May 2020, 10:15 AM
Pr0C0d3r
Pr0C0d3r - avatar
0
THANKS DUDE! I AM GONNA GO TRY IT OUT! SORRY FOR CAPS AGAIN, KEYBARD IS BROKEN.
13th May 2020, 10:08 AM
Pr0C0d3r
Pr0C0d3r - avatar
0
No worries, i posted it just to show there are multiple ways of getting what you want out of strings. Hope it helps
13th May 2020, 10:21 AM
Slick
Slick - avatar