Untitled
Anonymous
plain_text
02/14/2024 7:01 AM
344 B
18
Indexable
def draw_grid(rows, columns):
for i in range(rows):
print("+ " + "- " * (columns-1) + "+")
for j in range(4):
print("| " + " " * (columns-1) + "|")
print("+ " + "- " * (columns-1) + "+")
# Example usage:
draw_grid(2, 4)
Editor is loading...
Leave a Comment