subject

I'm taking a Python course and I'm having trouble figuring out how to write a code to complete this task: Implement the build_dictionary() function to build a word frequency dictionary from a list of words.

Ex: If the words list is:

["hey", "hi", "Mark", "hi", "mark"]
the dictionary returned from calling build_dictionary(words) is:
{'hey': 1, 'hi': 2, 'Mark': 1, 'mark': 1}
Ex: If the words list is:
["zyBooks", "now", "zyBooks", "later", "zyBooks", "forever"]
the dictionary returned from calling build_dictionary(words) is:
{'zyBooks': 3, 'now': 1, 'later': 1, 'forever': 1}
The main code builds the word list from an input string, calls build_dictionary() to build the dictionary, and displays the dictionary sorted by key value.
Ex: If the input is:
hey hi Mark hi mark
the output is:
Mark: 1
hey: 1
hi: 2
mark: 1

Thanks for your help!

ansver
Answers: 1

Another question on Computers and Technology

question
Computers and Technology, 23.06.2019 10:00
What is estimated time of arrival (eta)? a device that measures the acceleration (the rate of change of velocity) of an item and is used to track truck speeds or taxi cab speeds a gps technology adventure game that posts the longitude and latitude location for an item on the internet for users to find a north/south measurement of position the time of day of an expected arrival at a certain destination and is typically used for navigation applications
Answers: 3
question
Computers and Technology, 23.06.2019 11:00
How should you specify box sizes on a web page if you want the boxes to vary according to the font size of the text they contain? a. in pixels b. in inches c. as percentages d. in em units
Answers: 2
question
Computers and Technology, 26.06.2019 02:00
Hey mate me with the following: attribute that user to submit the information. answer in one word
Answers: 1
question
Computers and Technology, 26.06.2019 04:00
Semester a exam digital photography connection students 1-50 1c 2d 3a 4b 5c 6c 7b 8c 9b 10b 11b 12b 13a 14a 15b 16a 17a 18d 19a 20c 21b 22b 23d 24b 25a 26a 27b 28b 29b 30b 31b 32b 33a 34a 35a 36b 37a 38a 39c 40a 41c 42a 43b 44b 45b 46a 47d 48a 49d 50a
Answers: 1
You know the right answer?
I'm taking a Python course and I'm having trouble figuring out how to write a code to complete this...
Questions
question
Social Studies, 05.07.2019 08:00
Questions on the website: 13722363