Python Count Vowels
in 'aeiou'Practice

Scan each character and count a e i o u

Loop through the string. If the character is a vowel, add 1. Press Run to watch the scan.

Picture this: scan for a, e, i, o, u

Visit each character. If it is a vowel, add 1.

each charin s
→
in 'aeiou'?check
→
count += 1hit
→
print(count)total

In easy words

You walk left to right. Vowels increment a counter. Consonants are skipped.

Where this is used

Readability scores, speech tools, and simple text statistics.

Run algorithm

Each step highlights the matching Python line. Program output appears only when a line that prints actually runs.

Ready
count = 0
1s = input()
2count = 0
3for ch in s:
4if ch in "aeiou":
5 count += 1
6print(count)
Output:

Example Program

1s = input()
2print(sum(1 for ch in s if ch in "aeiou"))