To output alphabetical vowels and consonant counts in python

Asked 2 years ago, Updated 2 years ago, 18 views

I want to input a word into python and print out the vowels (a,e,i,o,u) and the number of consonants in that word, respectively, what should I do?

Enter one word : temporary

I want to do it like this

python

2022-09-22 08:45

1 Answers

I think we can specify a variable that counts the number of vowels and consonants and turn the for statement to add 1 to the match or use the count function


2022-09-22 08:45

If you have any answers or tips


© 2024 OneMinuteCode. All rights reserved.