Александр Мозжухин Васильевич, 321 группа DrawSquare 5838 | Теслюк Никита Сергеевич 321 группа DrawSquare 4960 | ||||
---|---|---|---|---|---|
f | 1 | def squares(w, h, *args): | f | 1 | def squares(w, h, *args): |
t | 2 | ans = [['.' for i in range(w)] for j in range(h)] | t | 2 | field = [['.' for _ in range(w)] for _ in range(h)] |
3 | for i in args: | 3 | for elem in args: | ||
4 | for q in range(i[0], i[2] + i[0]): | 4 | for i in range(elem[0], elem[0] + elem[2]): | ||
5 | for e in range(i[1], i[2] + i[1]): | 5 | for j in range(elem[1], elem[1] + elem[2]): | ||
6 | ans[e][q] = i[3] | 6 | field[j][i] = elem[3] | ||
7 | for i in ans: | 7 | for elem in field: | ||
8 | print(*i, sep='') | 8 | print(*elem, sep='') |
Legends | ||||||||||
---|---|---|---|---|---|---|---|---|---|---|
|
|