nanokatka

import1

Feb 24th, 2020
98
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.83 KB | None | 0 0
  1. import en_cz as cz
  2. import en_it as it
  3.  
  4. capital = False
  5. word = input("Enter word:")
  6. word2 = word.lower()
  7. language = input("Which language (CZ or IT)?")
  8.  
  9. if word != word2:
  10. capital = True
  11. else:
  12. capital = False
  13.  
  14.  
  15. if language == 'CZ' or language == 'cz':
  16. if cz.translations.get(word2):
  17. if capital:
  18. print(cz.translations.get(word2).capitalize())
  19. else:
  20. print(cz.translations.get(word2))
  21. else:
  22. print("word not in czech-english vocabulary")
  23. elif language =='IT' or language == 'it':
  24. if it.translations.get(word2):
  25. if capital:
  26. print(it.translations.get(word2).capitalize())
  27. else:
  28. print(it.translations.get(word2))
  29. else:
  30. print("word not in italian-english vocabulary")
  31. else:
  32. print("wrong language input")
Advertisement
Add Comment
Please, Sign In to add comment