Шилов Даниил Николаевич, группа 313, Севастополь DrawSquare 5114 | Бозин Павел, 124 группа DrawSquare 5547 | ||||
---|---|---|---|---|---|
f | 1 | def squares(w, h, *args): | f | 1 | def squares(w, h, *args): |
n | 2 | field = [['.' for _ in range(w)] for _ in range(h)] | n | 2 | canvas = [['.' for _ in range(w)] for _ in range(h)] |
3 | for x, y, s, c in args: | 3 | for x, y, s, c in args: | ||
4 | for i in range(s): | 4 | for i in range(s): | ||
5 | for j in range(s): | 5 | for j in range(s): | ||
t | 6 | field[y + i][x + j] = c | t | 6 | canvas[y + i][x + j] = c |
7 | for row in field: | 7 | for s in canvas: | ||
8 | print(''.join(row)) | 8 | print(''.join(s)) |
Legends | ||||||||||
---|---|---|---|---|---|---|---|---|---|---|
|
|