Advertisement
Guest User

Untitled

a guest
Oct 10th, 2017
109
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.32 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. # The function of panagram definition
  6. def pang_test(text):
  7. alf_en = ('qwertyuiopasdfghjklzxcvbnm')
  8. # Removing spaces
  9. new_alf = ('')
  10. for let in text:
  11. if let == str(' '):
  12. text = text.replace(let,'')
  13. # Blok of panagram definition
  14. for my_let in text:
  15. if my_let in alf_en:
  16. alf_en = alf_en.replace(my_let,'')
  17. continue
  18. if alf_en == (''):
  19. print ('This text is pangram')
  20. else:
  21. print ('This text is not pangram')
  22. pang_test('the quick brown fox jumps over the lazy dog')
  23. if lan == 'ru':
  24. def pang_test(text):
  25. alf_en = ('йцукенгшщзхъфывапролджэячсмитьбю')
  26. new_alf = ('')
  27. for let in text:
  28. if let == str(' '):
  29. text = text.replace(let,'')
  30. for my_let in text:
  31. if my_let in alf_en:
  32. alf_en = alf_en.replace(my_let,'')
  33. continue
  34. if alf_en == (''):
  35. print ('This text is pangram')
  36. else:
  37. print ('This text is not pangram')
  38. pang_test('широкая электрификация южных губерний даст мощный толчок подъёму сельского хозяйства')
  39. else:
  40. print ("Incorrect enter. Try again.")
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement