Accept a sequence of words as input. The words come on a single line, separated by commas.
Create a dictionary named freq whose keys are the distinct words in the sequence. The value corresponding to a key (word) should be the frequency of occurrence of that word in the sequence.
freq is checked for you.Example
Input: the,quick,brown,fox,the
freq: {'the': 2, 'quick': 1, 'brown': 1, 'fox': 1}
The input is read for you. Assign the answers to freq.
You do not need to print anything — the values you assign to those names are what gets checked, in that order.
Input
the,quick,brown,fox,jumps,over,the,lazy,dog,the
Output
{'the': 3, 'quick': 1, 'brown': 1, 'fox': 1, 'jumps': 1, 'over': 1, 'lazy': 1, 'dog': 1}