Question: need simple python code Due: Wednesday October 24th at 5:55 pm Write and test. For each problem, write code that satisfies the problem specification. Test

 need simple python code Due: Wednesday October 24th at 5:55 pm

need simple python code

Due: Wednesday October 24th at 5:55 pm Write and test. For each problem, write code that satisfies the problem specification. Test your code by designing at least three inputs for each problem that you believe are likely to reveal any bug and run your code on those inputs Submit your solution, including the test inputs as a py file via Moodle. Problem 1. Write a function named initialLetterCount that takes one parameter. wordLista list of words. Create and return a dictionary in which each initial letter of a word in wordList is a key and the corresponding value is the number of words in wordList that begin with that letter For example, the following is correct output horton [T,'say what,T, mean and'.T, 'mean'.what, T, say] print(initialLetterCount horton)) T: 4. say: 2. what: 2, "mean': 2, and: 1) Problem 2. Write a function named initialLetters that takes one parameter, wordList- a list of words. Create and return a dictionary in which each initial letter of a word in wordList is a key and the corresponding value is a list of the words in wordList that begin with that letter. There should be no duplicate words in any value in the dictionary For example, the following is correct output print(initialt.eters(horton)) Problem 3. Write a function named shareALetter that takes one parameter, wordList - a list of words. Create and return a dictionary in which each word in wordList is a key and the corresponding value is a lis of all the words in wordList that share at least one letter with that word. There should be no doblicate words in any value in the dictionary For example, the following is correct output print(shareALetter(horton) T [7, say: rsay. What, 'mean' 'and'], what [say, what, mean, 'and'), mean ['say, what. mean, and, and: [say, what, mean, andl

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!