Question: 3 . ) In main: i . ) Create two empty dictionaries ( emoticons _ to _ ids and ids _ to _ emoticons )
In main:
i Create two empty dictionaries emoticonstoids and
idstoemoticons
ii Call your loadtwitterdictsfromfile function passing it the file
name and the two dictionaries.
iii. Print the number of different emoticons found in the data file:
Emoticons:
one space after colon
iv Print the number of different user ID's found in the data file:
UserIDs:
three spaces after colon
v Next call your findmostcommon, passing it the emoticonstoids
dictionary. The result should look like this:
: occurs times
Now pop the most common emoticon from the dictionary and again call
your findmostcommon function on the emoticonstoids
dictionary. Since the :) is gone a different emoticon will be the most
common.
Repeat this process five times. Your output from all five function calls
should look like this:
: occurs times
:D occurs times
: occurs times
; occurs times
:P occurs times
Verify that your documentation makes sense and that youve added documentation
to each of your functions.
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
