Untitled

mail@pastecode.io avatar
unknown
plain_text
2 months ago
442 B
1
Indexable
Never
def print_grid():
    # print the top of the grid
    print('+ - - - - + - - - - +')

    # print the middle and bottom rows of the grid
    row = 0
    while row < 8:
        if row < 4:
            print('|         |         |')
        else:
            print('|         |         |')
        row += 1

    # print the bottom of the grid
    print('+ - - - - + - - - - +')
# call the function to print the grid
print_grid()
Leave a Comment