0
exercico: Prepare a program that receives a line of text and counts the vowels showing the respective Histogram a in the following form:
Example: Last line of text: "Next fourth line of text is holiday."
a : ****** (6)
e : *** (3)
i : *** (3)
o : ** (2)
u : * (1)
I did it this way:
texto = 'na proxima quarta-feira é feriado'
a = texto.count('a')
print('a:','*'*a,'(',a,')')
the way I did does exactly what the exercise asks for but I would have to make vowel by vowel. I would like to know a more practical way of doing it because for example if the exercise asked for letters of the whole alphabet it would be too big to do everything.
Thank you very much!
– Matheus Andrade