Question: Implement a function getFileText ( ) that takes a fileName as a parameter. The file, glossary.txt , contains a social media initialism and its meaning,

Implement a function getFileText() that takes a fileName as a parameter. The file, glossary.txt, contains a social media initialism and its meaning, separated by a colon.
example:
MTFBWY: May The Force Be With You
You may assume that the file is not empty. getFileText() will read a file to a String variable and then convert it to a list of strings. getFileText() will return a list of all the social media terms and their meanings. Youwill needtoremove any "Tn"['FB: Facebook', 'IG: Instagram', 'LI: LinkedIn', 'TW: Twitter', 'YT: YouTube', 'DM: Direct Message', 'MT: Modified Tweet', 'PM: Private Message', 'RT: Retweet', '411: Information', 'AF: As F***', 'AFAIK: As Far As I Know', 'AMA: Ask Me Anything', 'ASL: Age/Sex/Location','B4: Before', 'BAE: Before Anyone Else', 'B/C, BC: Because', 'BFF: Best Friends Forever', 'BRB: Be Right Back', 'BTAIM: Be That As It May', 'BTS: Behind the Scenes', 'BTW: By The Way', 'DAE: Does Anyone Know?',...]2. Implement a function glossaryTerms (fname) that takes a filename. The function will call getFileText () to get the list from the file. Your code will convert each list entry into a key-value pair and store it in a dictionary. Assign the social media initialism as the key and its meaning as the value:example:key: MTFBWY value: May The Force Be With YouglossaryTerms () will call printWordD (dictionary) to display the dictionary in key-value pairs.FB: FacebookIG: InstagramLI: LinkedInTW: TwitterYT: YouTubeDM: Direct MessageMT: Modified TweetPM: Private MessageRT: Retweet411: Information
Implement a function findMeaning () which takes a string, key, as a parameter. This function will return the key-value pair.
 Implement a function getFileText() that takes a fileName as a parameter.

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!