Ex: If the input of the program is: educate c the program opens the file educate.txt, which contains: brainwash brief civilize coach cultivate develop discipline drill edify enlighten exercise explain foster improve indoctrinate inform instruct mature nurture rear school train tutor then the program outputs: civilize coach cultivate Ex: If the input of the program is: educate a
PYTHON ONLY! Given a set of text files containing synonyms for different words, complete the main
Hints: Use the first letter of a synonym as the key when storing the synonym into the dictionary. Assume all letters are in lowercase.
Ex: If the input of the program is:
educate
c
the program opens the file educate.txt, which contains:
brainwash brief
civilize coach cultivate
develop discipline drill
edify enlighten exercise explain
foster
improve indoctrinate inform instruct
mature
nurture
rear
school
train tutor
then the program outputs:
civilize
coach
cultivate
Ex: If the input of the program is:
educate
a
then the program outputs:
No synonyms for educate begin with a.



Trending now
This is a popular solution!
Step by step
Solved in 4 steps with 2 images









