width = int(input('Enter a width')) height = int(input('Enter a height')) to_height = 0 filled = input('Filled (y/n)') print('Here is your box') if height and width == 1: print('+') else: if filled == 'y': while to_height < height: print('+ ' * width) to_height = to_height + 1 if filled == 'n': print('+ ' * (width)) height = height - 2 while to_height < height: print('+', ' ' * ((width - 3) * 2), ' +') to_height = to_height + 1 height = height - 2 print('+ ' * (width))