Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import en_cz as cz
- import en_it as it
- capital = False
- word = input("Enter word:")
- word2 = word.lower()
- language = input("Which language (CZ or IT)?")
- if word != word2:
- capital = True
- else:
- capital = False
- if language == 'CZ' or language == 'cz':
- if cz.translations.get(word2):
- if capital:
- print(cz.translations.get(word2).capitalize())
- else:
- print(cz.translations.get(word2))
- else:
- print("word not in czech-english vocabulary")
- elif language =='IT' or language == 'it':
- if it.translations.get(word2):
- if capital:
- print(it.translations.get(word2).capitalize())
- else:
- print(it.translations.get(word2))
- else:
- print("word not in italian-english vocabulary")
- else:
- print("wrong language input")
Advertisement
Add Comment
Please, Sign In to add comment