Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PASCAL

pascal

def PascalTriangle(n):
   trow = [1]
   y = [0]
   for x in range(n):
      print(trow)
      trow=[left+right for left,right in zip(trow+y, y+trow)]
   return n>=1
Source by www.askpython.com #
 
PREVIOUS NEXT
Tagged: #pascal
ADD COMMENT
Topic
Name
3+7 =