arrow_forward
همه ارسالها
جزئیات ارسال کد#105
برای پسندیدن وارد شوید
1row, col = map(int, input().split())
2
3shape = ""
4
5right = False
6
7for n in range(1, row + 1):
8 if n % 2:
9 shape += "#" * col + "\n"
10 right = not right
11 continue
12 if right:
13 shape += "*" * (col - 1) + "#" + "\n"
14 else:
15 shape += "#" + "*" * (col - 1) + "\n"
16else:
17 print(shape)
18 del n
کد ارسالشده برای داوری خودکار هاتکدز
UTF-8