Cody Bable

Generation

generate functionWed, 05 Jul 2023

make a 8 by 8 grid

plus = '+ ' minus = '- ' space = ' ' pipe = '| ' def makeRow(width): print(plus + minus * width + plus + minus * width + plus) def makeGrid(width): makeRow(width) print((pipe + space * width + pipe + space * width + pipe + '\n') * width, end='') makeRow(width) print((pipe + space * width + pipe + space * width + pipe + '\n') * width, end='') makeRow(width) makeGrid(8)

Questions about programming?Chat with your personal AI assistant