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 number in range(height): print("+ " * width) elif filled == "n": if width == 1: for number in range(height): print("+") else: print("+ "*width) for number in range(height-2): print("+", " "*(((width-1)+(width-2))-2), "+") print("+ "*width)