(25 points) Texting Translator Granny just got a cell phone, and wants you to text her to keep her up to date. However, she doesn't know any standard texting abbreviations,
and the thought of having to write everything out is both repulsive
and expensive!
Write a program that asks you for sentences, one at a time. As each is entered, it expands any texting abbreviations in the sentence into full words.
You should store the abbreviations and full words in a dictionary. Your dictionary should include at least
these:
r |
are |
k |
okay |
lol |
laugh out loud |
imo |
in my opinion |
jk |
just kidding |
g |
grin |
hw |
homework |
You don't need to handle punctuation, and your output need not preserve the exact whitespace entered, as shown:
Please enter your text after each prompt. <Enter> to quit.
>imo you r great
in my opinion you are great
>lol g g
laugh out loud grin grin
>got to do my hw
got to do my homework
>