Command Palette

Search for a command to run...

Hectal
Phase 2: Control Flow
Python · Exercise 3 of 6 PreviousNext
Beginner

Count the vowels in a word

Use a for loop over the text in word and count how many letters are one of a, e, i, o, u. Store the answer in the variable count.

Then print Vowels: followed by the count. The text is always in lowercase.

What Check tests

  1. "education" has 5 vowels
  2. "banana" has 3
  3. "rhythm" has 0
  4. Your code uses a for loop
  5. The program prints Vowels: 5

Stuck? One hint at a time

The solution unlocks after your first Check. Try first: that is where the learning happens.

main.py
Sign in to run your code.

Output

Press Run to see what your program prints.