Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Python 3. Write a function vowelCounts that accepts a single argument, a phrase consisting of words separated by spaces. The function then returns a list

Python

3. Write a function vowelCounts that accepts a single argument, a phrase consisting of words separated by spaces. The function then returns a list with the counts of the number of vowels that are present in each of the words in the phrase. For example, in the first example below, all the words have 2 vowels, except for them and DAY! which have only 1. The function then returns a list with a 2 for each word except for the above words, which have vowel counts of 1. Hint: dont worry about punctuation. >>> vowelCounts( 'Apples are healthy, you should eat them every DAY!') [2, 2, 2, 2, 2, 2, 1, 2, 1] >>> vowelCounts( "So long, see you LATER." ) [1, 1, 2, 2, 2] >>> vowelCounts( 'If it is raining, use an umbrella.') [1, 1, 1, 3, 2, 1, 3] >>>

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_2

Step: 3

blur-text-image_3

Ace Your Homework with AI

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

Get Started

Recommended Textbook for

Intelligent Databases Object Oriented Deductive Hypermedia Technologies

Authors: Kamran Parsaye, Mark Chignell, Setrag Khoshafian, Harry Wong

1st Edition

0471503452, 978-0471503453

More Books

Students also viewed these Databases questions

Question

Differentiate 3sin(9x+2x)

Answered: 1 week ago

Question

12-5 How will MIS help my career?

Answered: 1 week ago