Last active
October 28, 2019 16:07
-
-
Save officialcjunior/f6de341f02cfe0ddbafd6a9afef7bf77 to your computer and use it in GitHub Desktop.
This python program prints the Pascal's Triangle
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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