Skip to content

Instantly share code, notes, and snippets.

@alenthomas
Last active November 16, 2016 13:26
Show Gist options
  • Save alenthomas/78b4be2fa9ef4a78958e865df9049844 to your computer and use it in GitHub Desktop.
Save alenthomas/78b4be2fa9ef4a78958e865df9049844 to your computer and use it in GitHub Desktop.
Print pyramid python
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