I have tried to make a graph but the sides have multiple numbers like 19,19,19,19,18,18,18,18,17 etc what I really need is only one of each number on the y axis (Also there supposed to be 5 stars in the graph{x=0-x=4:))
attempt 1
##David Jeon
##Dec 16, 2015
##A program to plot the graph of y = x^2 + 3 using formatted output
##ICS201
##Graph from x = 0 to x = 4
##program to create a y=x^2+3 graph
print('{0:>{width}}'.format('y', width=2))
x = 4
y = x**2+3
oldY = y
for x in range(4,-1,-1):
print('{0:>3}{1:>{width}}'.format(str(y)+'|','*', width=x*2))
y = x**2+3
difference = oldY - y
for lines in range(0,difference+1):
print('{0:>3}'.format(str(y)+'|'))