Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

PYTHON ONLY Write a function called count_vowels() using what we learned this week about list and recursive function. Here are the requirements: 1. solution uses

PYTHON ONLY

Write a function called count_vowels() using what we learned this week about list and recursive function. Here are the requirements:

1. solution uses recursive function. A recursive function has exit condition, and statements that calls itself.

2. function count_vowels takes a parameter of a String type: count_vowels(mystr)

3. function count_vowels returns a integer of how many vowels there are in the string parameter

4. a vowel is any letter in a, e, i, o, u, A, E, I, O, U

5. function count_vowels collects all the vowels in the string parameter, and prints out all the vowels at the end.

6. here's an example of calling the function and the output:

>>> count = count_vowels("banana")

aaa

>>> count

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

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

Recommended Textbook for

Database Marketing The New Profit Frontier

Authors: Ed Burnett

1st Edition

0964535629, 978-0964535626

More Books

Students also viewed these Databases questions

Question

=+applying to all or most employers and employees?

Answered: 1 week ago

Question

=+associated with political parties and if so, which ones? Are

Answered: 1 week ago