length = int(input( "Enter a length: " )) width = int(input( "Enter a width: " )) filled = input( "Filled (y/n): " ) if filled == "n": print( " + " * length ) length = length - 2 while width > 1: print( " + " + " " * length + " + ") width = width - 1 length = length + 2 print( " + " * length ) else: while width > 0: print( " + " * length ) width = width - 1