PnnK

task8

Aug 10th, 2021
132
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.44 KB | None | 0 0
  1. alf = ['Т', 'И', 'М', 'О', 'Ф', 'Е', 'Й']
  2. count = 0
  3. word = [0, 0, 0, 0, 0]
  4. for b1 in alf:
  5.     word[0] = b1
  6.     for b2 in alf:
  7.         word[1] = b2
  8.         for b3 in alf:
  9.             word[2] = b3
  10.             for b4 in alf:
  11.                 word[3] = b4
  12.                 for b5 in alf:
  13.                     word[4] = b5
  14.                     if 'Т' in word and word.count('Й') <= 1:
  15.                         count += 1
  16. print(count)
Advertisement
Add Comment
Please, Sign In to add comment