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