Question
Python Recursion Write a function called most_vowels(words) that takes a list of strings called words and returns the string in the list with the most
Python Recursion
Write a function called most_vowels(words) that takes a list of strings called words and returns the string in the list with the most vowels. You may assume that the strings only contain lowercase letters. For example:
>>> most_vowels(['vowels', 'are', 'amazing', 'things']) result: 'amazing' >>> most_vowels(['obama', 'bush', 'clinton']) result: 'obama'
The function that you write must use a helper function along with either a list comprehension or recursion. In either case, you should put the helper function in your ps3pr2.py file, just above the definition of your function for this problem.
Note: You dont need to worry about cases in which two or more words are tied for the most vowels.
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started