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

 IN PYTHON PLEASE (Count vowels and consonants) Write a program that

(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

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!