Question: Python - Define a function voweliest that takes as input a string and returns as output a tuple where the string that has the most
Python - Define a function voweliest that takes as input a string and returns as output a tuple where the string that has the most vowels (a, e, i, o, u) in it is the first element and the second is the number of vowels in that string.

Problem 7 Define a function voweliest that takes as input a string and returns as output a tuple where the string that has the most vowels (a, e, i, o, u) in it is the first element and the second is the number of vowels in that string. Note: don't worry about ties or capital letters Hint: consider defining and using a separate function that counts the number of vowels in a given string In [*]: ['a', 'e', 'i', 'o', 'u'] 1 vowels 2. 3 Problem 7 Tests: In [*]: == ('onomatopoeia', 8 1 assert voweliest('an onomatopoeia that phonetically imitates the sound that it describes') 2 assert voweliest('hello world') ('hello', 2)
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
