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