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