A box we'll define as a 2-dimensional shape with an equal number of rows and columns. If we were to draw a box of size 3, we could make a box of little []
blocks.
[][][]
[][][]
[][][]
A box of 5 units would consist of 5 rows and columns of []
units, and so on.
Write a program draw_boxes.py
that has the user enter a size for a box, n
. That value should be sent to a function boxy(n)
that uses nested loops to display a box of the appropriate size on the screen.
Sample interaction:
Enter a box size (1-10): 4
[][][][]
[][][][]
[][][][]
[][][][]