Ответ:
1. Вариант.
ky, kx = int(input()) - 1, int(input()) - 1
for i in range(8):
~~s = ''
~~for j in range(8):
~~~~if i == ky and j == kx: s += 'K'
~~~~elif abs((i - ky) * (j - kx)) == 2: s += '*'
~~~~else: s += '.'
~~print(s)
2. Вариант.
Решение с помощью двумерного массива
.
ky, kx = int(input()) - 1, int(input()) - 1
s = [['.' for _ in range(8)] for _ in range(8)]
s[ky][kx] = 'K'
for i in range(8):
~~for j in range(8):
~~~~if abs((i - ky) * (j - kx)) == 2: s[i][j] = '*'
for i in range(8): print(*s[i])