Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

in python please 5.3 LAB: Function to count vowels Write a function def countVowe L(word) that returns a count of all vowels in the string

in python please
image text in transcribed
5.3 LAB: Function to count vowels Write a function def countVowe L(word) that returns a count of all vowels in the string word. Vowels are the letters a, e, i,, , and u and their uppercase variations, A,E,1,O, and U. - Create a count variable - Use a for loop to check each character (ch) in the string (word) - Inside the for loop, use an if statement to test if the character is in 'AEIOU' (you might want to change each character to - upper() here. - If there is a vowel, increase the count - Return the count from the function Ex: If word is: Wonderful then the return value from the function is: becouse there is an ' o, ' e ', and ' u '. Ex. If word is: Eventually then the return value from the function is: because there are ' e; ' u ', and 'a'. You only need to write the function. Unit tests will access your function. \begin{tabular}{l|l} Letivir \\ Acti. \end{tabular} 0/10

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Students also viewed these Databases questions