Сапрончев Андрей Михайлович, 402 группа DrawSquare 5340 | Бозин Павел, 124 группа DrawSquare 5547 | ||||
---|---|---|---|---|---|
n | 1 | def squares(w, h, *squares): | n | 1 | def squares(w, h, *args): |
2 | screen = [['.' for _ in range(w)] for _ in range(h)] | 2 | canvas = [['.' for _ in range(w)] for _ in range(h)] | ||
3 | for x, y, s, filler in squares: | 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 | screen[y + i][x + j] = filler | t | 6 | canvas[y + i][x + j] = c |
7 | for row in screen: | 7 | for s in canvas: | ||
8 | print(''.join(row)) | 8 | print(''.join(s)) |
Legends | ||||||||||
---|---|---|---|---|---|---|---|---|---|---|
|
|