graphHeight = int(input("What is the max height?")) graphWidth = int(input("What is the width?")) yList = [2,2,2,2,2,2,2,2,2,2,2,2,2,2,2] xlist = [4,4,4,4,4,4,4,4,4,4,4] yNum = 0 xNum = 0 graphHeightTop = graphHeight graphHeightBottom = -graphHeight axisNum = graphHeight x = 0 y = graphHeight while graphHeightTop != graphHeightBottom - 1: #space added to account for the '-', and properly align the graph if axisNum < 0: if y == yList(yNum): print(str(axisNum) + "|") else: print(str(axisNum) + "|") elif axisNum == 0: print(" " + str(axisNum) + "+" + "-" * graphWidth) else: print(" " + str(axisNum) + "|") graphHeightTop = graphHeightTop - 1 axisNum = axisNum - 1