Question: Write a mini English-to-Spanish word dictionary that uses a Python dictionary to perform a word lookup based on the contents of an input file called

Write a mini English-to-Spanish word dictionary that uses a Python dictionary to perform a word lookup based on the contents of an input file called dictionary.txt. The input file contains a list of English words and their Spanish equivalent, one entry per line (i.e. An entry is an English word followed by its Spanish equivalent). The program constructs a dictionary by reading the content of the file, and then prompts the user to input an English word. If the word is in the dictionary, the program outputs the Spanish translation. Otherwise, it should output Word not found.

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!