please solve it as Python, use recursion
Posted: Thu Jul 14, 2022 2:17 pm
please solve it as Python, use recursion
Function Name: numVowels() Parameters: list of names ( list) Returns: dictionary mapping names to number of vowels ( dict ) Description: At the end of the semester, you want to figure out how many vowels are in the names of some of your friends. Return a dictionary containing the name of the TAs as the keys mapped to how many vowels there are in each name. Note: You can use loops to count the number of vowels in the names_, but you must use recursion to create your dictionary. Note: This problem is case insensitive, so and are treated as the same and should be included in the number of vowels. ≫> numVowels (["Anupama", "Coco", "Rod", "Fiona"]) \{'Fiona': 3, 'Rod': 1, 'Coco': 2, 'Anupama': 4\} ≫> numVowels (["Michael", "Carol", "Paris"]) { 'Paris': 2, 'Carol': 2, 'Michael': 3}
Function Name: numVowels() Parameters: list of names ( list) Returns: dictionary mapping names to number of vowels ( dict ) Description: At the end of the semester, you want to figure out how many vowels are in the names of some of your friends. Return a dictionary containing the name of the TAs as the keys mapped to how many vowels there are in each name. Note: You can use loops to count the number of vowels in the names_, but you must use recursion to create your dictionary. Note: This problem is case insensitive, so and are treated as the same and should be included in the number of vowels. ≫> numVowels (["Anupama", "Coco", "Rod", "Fiona"]) \{'Fiona': 3, 'Rod': 1, 'Coco': 2, 'Anupama': 4\} ≫> numVowels (["Michael", "Carol", "Paris"]) { 'Paris': 2, 'Carol': 2, 'Michael': 3}