Advertisement
Guest User

Untitled

a guest
Oct 11th, 2017
76
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.10 KB | None | 0 0
  1. # Blok of language selection
  2. lan = input('Enter the input language (ru, en) ')
  3. while lab == 'en' or 'ru':
  4. if lan == 'en':
  5. alf = ('qwertyuiopasdfghjklzxcvbnm')
  6. if lan == 'ru':
  7. alf_en = ('йцукенгшщзхъфывапролджэячсмитьбю')
  8. else:
  9. print ("Incorrect enter. Try again.")
  10. # The function of panagram definition
  11. def pang_test(text):
  12. alf_en = ('qwertyuiopasdfghjklzxcvbnm')
  13. # Removing spaces
  14. new_alf = ('')
  15. for let in text:
  16. if let == str(' '):
  17. text = text.replace(let,'')
  18. # Blok of panagram definition
  19. for my_let in text:
  20. if my_let in alf_en:
  21. alf_en = alf_en.replace(my_let,'')
  22. continue
  23. if alf_en == (''):
  24. print ('This text is pangram')
  25. elif lan == 'en' and let == 'ю':
  26. print ('Invalid input language')
  27. elif: lan == 'ru' and let == 'm':
  28. print ('Invalid input language')
  29. else:
  30. print ('This text is not pangram')
  31. pang_test('the quick brown fox jumps over the lazy dog')
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement