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": print("+ " * width) for number in range(height-2): print("+", " "*(width*2 - 4), "+") print("+ " * width)