inputintx = int(input("Enter a width:")) inputinty = int(input("Enter a height:")) fill = input("Filled? (y/n):") if fill == "n": gap = inputintx - 2 result = inputintx * " + " elif fill == "y": result = inputintx * " + " for inputint in range(inputinty): if fill == "n": print(result) for inputinty in range(gap): elif fill == "y": print(result)