How Many Vowels?

Challenge Difficulty: Easy | Estimated completion time: ~5 minutes

Create a function that takes a string and returns the number (count) of vowels in the string.

Examples

count_vowels("Celebration") ➞ 5 # 5 vowels
 
count_vowels("Palm") ➞ 1 # 1 vowel
 
count_vowels("Prediction") ➞ 4 # 4 vowels

Notes

  • a, e, i, o, u are considered vowels (not y).
  • All test cases are one word and only contain letters.

Solution

Python
Output