Advertisement
matbiz01

Untitled

Mar 24th, 2021
618
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.37 KB | None | 0 0
  1. xVals = [x for x,y in basePoints]
  2. pyramid = []
  3. pyramid.append(basePoints[0])
  4. pyramid.append(basePoints[1])
  5. pyramid[1].append((basePoints[1][1] - basePoints[0][1]) / (basePoints[1][0] - basePoints[0][0]))
  6. for x in range(2, n):
  7.     pyramid.append(basePoints[x])
  8.     for y in range(x):
  9.         pyramid[x].append((pyramid[x][y + 1] - pyramid[x - 1][y + 1]) / (xVals[x] - xVals[x - (y + 1)]))
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement