Question: HW-Dictionary Your program is supposed to do the following: -Input: the user enters a line of texts -What it does: build a histogram of the

 HW-Dictionary Your program is supposed to do the following: -Input: theuser enters a line of texts -What it does: build a histogram

HW-Dictionary Your program is supposed to do the following: -Input: the user enters a line of texts -What it does: build a histogram of the words in the line of texts. -Output: 1. the histogram of the words 2. The most frequently used word Sample output: =========== RESTART: C:/Users/Owner1/Documents/ABC-Python/ Enter a line of text cat hi cat hi cat hi red blue red Counts \{'cat': 3 , 'hi': 3, 'red': 2 , 'blue': 1\} The most frequently used word and = of frequency: cat 3 The most frequently used word and ; of frequency: hi 3 >> I Enter a line of text cat hi cat hi cat hi red blue red Counts \{'cat': 3, 'hi': 3, 'red': 2, 'blue': 1\} The most frequently used word and = of frequency: cat 3 The most frequently used word and f of frequency: hi 3 | For the test case, make sure to use the following test case: fish fish cat cat fish cat blue red blue Requirement/restriction; Do NOT use the get method provided by dictionary. For example, counts.get(name,0) should be used (watch the part 2 video lecture @6:22). As shown in the part2 lecture video, use the if-else statement (part2 video lecture @6:22) for counting words

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 Programming Questions!