Question: modify my docstring! and change the function name to find _ letters ( ) convert it into a function that takes a string for an
modify my docstring! and change the function name to findletters
convert it into a function that takes a string for an argument called words
counts the number of occurrences of the letters using a dictionary data structure
For instance your output look different, but the values should be the same:
michael would return i:e:a:
miguelito would return i:e:u:o:
Printing the dictionary will be the responsibility of the caller. But when you are building it you can add print statements to verify your code. Good debugging technique.
You make your program "case insensitive"
This means Angel should return a:e: not e:
using annotations: modify the argument list to default to vowels 'aeiou', but can be changed by the caller. add the return type set
ie def findletterswords:str letters:str'aeiou' set
which can have the following example calls
findletters 'galaxy'
findletters 'galaxy', wxyz
findlettersletters'abcd', words'Abba Rocks Big Time'
Answer the question: Why did I use the list version, rather than the set version?
Suggested test strings you will have to come up with others miguelito, Arturo, Angelica, Chrys Senorita Bullfrog
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
