# # Print a parabolic shape # # The x-axis goes down the screen # The y-axis goes right # # step thru values of x # for x in range(0,30): # compute the y coordinate of parabola # y = -1/2 x^2 + 60 y = -(0.5*x-5)**2 + 60 # make sure we actually need to print something if y >= 0: # number of spaces to print, round up n = int(y + 0.5) # print spaces up to y for j in range(0,n) : print(" ", end="") # print the marker for the parabola print("o") else: # if y < 0, just print a blank line print("")