width = int(input("Enter the width of the box: ")) height = int(input("Enter the height of the box: ")) fill = input("Do you want the box filled? (yes/no): ").lower() # Draw the box if fill == "yes": # Print a filled box for i in range(height): print("+" * width) else: for i in range(height): if i == 0 or i == height - 1: print("+" * width) else: print("+" + " " * (width - 2) + "+")