Learn to code with step-by-step lessons. A place for students to work through programming fundamentals and build skills.
One possible program:
phrasebook = {
"hello": "hola",
"yes": "si",
"no": "no",
"water": "agua",
"thanks": "gracias",
}
while True:
english = input("English word (or 'quit'): ").strip().lower()
if english == "quit":
break
print(phrasebook.get(english, "No translation"))