Exercise 3.3 Drawing a gird | Python by Think Python

Опубликовано: 21 Июнь 2026
на канале: Python Programmer
5,329
43

1. Write a function that draws a grid like the following:
- - - - + - - - - +
| | |
| | |
| | |
| | |
- - - - + - - - - +
| | |
| | |
| | |
| | |
- - - - + - - - - +
Hint: to print more than one value on a line, you can print a comma-separated sequence of
values:
print('+', '-')
By default, print advances to the next line, but you can override that behavior and put a
space at the end, like this:
print('+', end=' ')
print('-')