Никитин Олег Юрьевич 127сп_кт DrawSquare 5285 | Абдикашева Вилена Ринатовна, 411 группа DrawSquare 6166 | ||||
---|---|---|---|---|---|
f | 1 | def squares(w, h, *args): | f | 1 | def squares(w, h, *args): |
t | 2 | l = [['.' for _ in range(w)] for _ in range(h)] | t | 2 | bckgrnd = [['.' for _ in range(w)] for i in range(h)] |
3 | for a in args: | 3 | for square in args: | ||
4 | x, y, n, c = a | 4 | X, Y, s, c = square | ||
5 | for i in range(n): | 5 | for i in range(s): | ||
6 | for j in range(n): | 6 | for j in range(s): | ||
7 | l[y + i][x + j] = c | 7 | bckgrnd[i + Y][j + X] = c | ||
8 | for l in l: | 8 | for row in bckgrnd: | ||
9 | print(*l, sep='') | 9 | print(*row, sep='') |
Legends | ||||||||||
---|---|---|---|---|---|---|---|---|---|---|
|
|