Skip to content

Instantly share code, notes, and snippets.

@jamtat
Last active December 24, 2015 21:29
Show Gist options
  • Save jamtat/6866108 to your computer and use it in GitHub Desktop.
Save jamtat/6866108 to your computer and use it in GitHub Desktop.
Simple python script for drawing derpy pyramids
def makePyramid(height=50, char='.'):
#Takes a height and generates a pretty pyramid, can optionally supply a character from which to make pyramid
for i in range(0,height):
print( (height-1-i)*' '+char*(i*2+1))
def makeAwkwardPyramid(height=50, middle=' ', left='/', right='\\', bottom='-'):
#Like the other one but fancier.
for i in range(0,height):
print((height-1-i)*' '+left+middle*(i*2)+right)
print(bottom*height*2)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment