Question: In Python create a program that includes a function named numVowels. This function should be passed a string that can be a mix of uppercase
In Python create a program that includes a function named numVowels. This function should be passed a string that can be a mix of uppercase and lowercase characters, then return a tuple that contains two integers: the number of vowels in that string and the number of consonants in that string. Be sure and use either a set or dictionary in this method!
Input a string from the user in your main program, pass it to this function, then output the results of the function in a user-friendly way. For example:
Please enter a string: banana
Your string banana has 3 vowels and 3 consonants.
Add comments to your program starting with your name at the top, then throughout your program to describe what you are doing. Be sure and make your calculations clear, giving your variables meaningful names. Also be sure to indent consistently throughout your program to make it more readable. Be sure you run this and test it a few times before submitting.
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
