Objective
Create a Python program that inverts a dictionary of translations so you can look up in the other direction.
Instructions
- Use this Spanish → English dictionary:
{"hola": "hello", "adios": "goodbye", "gato": "cat", "perro": "dog", "casa": "house"}. - Build a second English → Spanish dictionary by swapping keys and values.
- Read a word in English.
- Show its Spanish translation, or
Not foundif it is not in the dictionary.
cat
gato
Open the editor in full screen: the statement on the left and your code, the output and the tests on the right.
Start exercise