Question: IN PYTHON PLEASE (Count vowels and consonants) Write a program that prompts the user to enter a string and displays the number of vowels and
IN PYTHON PLEASE

(Count vowels and consonants) Write a program that prompts the user to enter a string and displays the number of vowels and consonants in the string. The same vowels or consonants are counted only once. The letters are case-insensitive. The letters for vowels are A, E, I, O, and U. Implement it in O(1) time. Hint: Use a set to store vowels. It takes O(1) time to test if an element is in a set. Sample Run Enter a string: Programming is fun The number of vowels is 4 The number of consonants is 7
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
