Question: Write a function called count _ vowels ( s ) that takes in a string s as an argument and returns the number of vowels
Write a function called countvowels that takes in a string as an argument and returns the number of vowels in the string. Use a for loop and an if statement to check if eachtcharacter in the string is a vowel.
Test case:
printcountvowelshello # Output:
printcountvowelsPython # Output:
printcountvowelsThe quick brown fox jumps over the lazy dog" # Output:
printcountvowels # Output:
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
