The ideal results below:
>>> count_number_of_each_vowel("Zoo")
{'o': 2}
>>> count_number_of_each_vowel("Anaconda")
{'a': 3, 'o': 1}
>>> count_number_of_each_vowel("Programming and Data Analysis")
{'o': 1, 'a': 6, 'i': 2}
Broken/Incomplete code:
def count_number_of_each_vowel(x: str) -> dict:
x = x.lower()
vowel_counts = []
for vowel in "aeiou":
count = lowercase.count(vowel)
vowel_counts[vowel] = count
return vowel_counts
Please help fix this broken code