width = int(input("enter a width: ")) height = int(input("enter a height: ")) filled = input("filled? (y/n): ") print("Here is your box:") if filled == "y": for i in range(height): print("+ " * width) else: spaces = width * 2 - 3 print("+ " * width) for i in range(height - 2): print("+" + " " * spaces + "+") print("+ " * width)