def draw_box(num1, num2, filled): for i in range(num2): if i == 0 or i == num2 - 1: print("+" * num1) else: if filled: print("+" * num1) else: print("+" + " " * (num1 - 2) + "+") def main(): num1 = int(input("what is your width: ")) num2 = int(input("what is your height: ")) filled =input("filled (y/n): ").lower() == 'y' print("printing. . .") draw_box(num1, num2, filled) print("printing complete") if __name__ == "__main__": main()