Advertisement
ForestFox

X игра

Oct 22nd, 2021
916
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.58 KB | None | 0 0
  1. s = 'x'*int(input())
  2. mov = 0
  3. print(s)
  4. while len(s) > 0:
  5.     if mov % 2 == 0:
  6.         print('Ход первого')
  7.     if mov % 2 == 1:
  8.         print('Ход второго')
  9.     i = input()
  10.  
  11.     if i not in '12':
  12.         print('Вы дуууумающий человек')
  13.         continue
  14.     elif len(s) == 1 and i == '2':
  15.         print('Вы дуууумающий человек')
  16.         continue
  17.  
  18.     i = int(i)
  19.     mov += 1
  20.     s = s[i:]
  21.     print(s)
  22. if mov % 2 == 0:
  23.     print('Проиграл первый')
  24. else:
  25.     print('Проиграл второй')
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement