Last active
November 16, 2016 13:26
-
-
Save alenthomas/78b4be2fa9ef4a78958e865df9049844 to your computer and use it in GitHub Desktop.
Print pyramid python
This file contains 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
def pyramid(num): | |
for i in range(1, num+1): | |
if i == num: | |
for j in reversed(range(1, num+1)): | |
print('*'*j) | |
else: | |
print('*'*i) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment