Романтовский Александр 522 DrawSquare 5623 | Балабанов Фёдор Михайлович, 428 группа DrawSquare 5054 | ||||
---|---|---|---|---|---|
t | 1 | def squares(w, h, *args): | t | 1 | def squares(w, h, *squares): |
2 | screen = [['.' for _ in range(w)] for _ in range(h)] | 2 | d = [['.' for _ in range(w)] for __ in range(h)] | ||
3 | for X, Y, s, c in args: | 3 | for x, y, s, c in squares: | ||
4 | for i in range(Y, Y + s): | 4 | for col in range(x, x + s): | ||
5 | for j in range(X, X + s): | 5 | for row in range(y, y + s): | ||
6 | screen[i][j] = c | 6 | d[row][col] = c | ||
7 | for row in screen: | 7 | for l in d: | ||
8 | print(''.join(row)) | 8 | print(''.join(l)) |
Legends | ||||||||||
---|---|---|---|---|---|---|---|---|---|---|
|
|