Question: Using basic recursion or list comprehension on python 3.6.2 3. Write a function called most_consonants(wordlist) that takes a list of lowercase words called wordlist and
Using basic recursion or list comprehension on python 3.6.2
3. Write a function called most_consonants(wordlist) that takes a list of lowercase words called wordlist and returns the word in the list with the most consonants. For example: most_consonantsCC'computer', 'science']) computer print(most_consonantsCC'obama', 'bush', 'clinton'])) clinton You don't need to worry about cases in which two or more words are tied for the most consonants. One thing that you'll need to solve this problem is a way to determine the number of consonants in a given word. We strongly encourage you to use as a helper function one of the functions that you wrote for parts 1 and 2 of this problem. Think about how you could use the value returned by one of those functions to determine how many consonants are in a given word. If you prefer, you are welcome to write a separate helper function that uses either recursion or a list comprehension to count the number of consonants in a word. We also strongly encourage you to use the list-of-lists technique that we discussed in lecture as the basis of your most_consonants function, but you may use recursion instead if you prefer
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
