Python Programming - Console Input/Output - Discussion
Discussion Forum : Console Input/Output - General Questions (Q.No. 72)
72.
How can you read a string from the console, count the number of vowels and consonants, and print the result?
Answer: Option
Explanation:
To read a string from the console, count the number of vowels and consonants, and print the result, use
string_input = input("Enter a string: "); print("Vowels:", count_vowels(string_input), "Consonants:", count_consonants(string_input))
.
Discussion:
Be the first person to comment on this question !
Post your comments here:
Quick links
Quantitative Aptitude
Verbal (English)
Reasoning
Programming
Interview
Placement Papers