Skip to content

Instantly share code, notes, and snippets.

@officialcjunior
Last active October 28, 2019 16:07
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save officialcjunior/f6de341f02cfe0ddbafd6a9afef7bf77 to your computer and use it in GitHub Desktop.
Save officialcjunior/f6de341f02cfe0ddbafd6a9afef7bf77 to your computer and use it in GitHub Desktop.
This python program prints the Pascal's Triangle
for i in range(1, 9):
m = 1
for j in range(7, i-2, -1):
print(" ", end=' ')
for k in range(1, i+1):
print(m, end=' ')
m = m * 2
m = m // 2
for o in range (1,i):
m = m // 2
print (m, end=' ')
print("")
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment