width = int(input('Enter a width: ' )) height = int(input('Enter a height: ' )) filled = input('Filled (y/n): ') print(' ') print('Here is your box:') lines = height - 2 spaces = width - 3 if filled == 'n': print('+ ' * width) while lines > 0: print('+ ', ' ' * spaces, '+ ' ) lines = lines - 1 print('+ ' * width) if filled == 'y': while height > 0: print("+ " * width) height = height -1