Last active
December 24, 2015 21:29
-
-
Save jamtat/6866108 to your computer and use it in GitHub Desktop.
Simple python script for drawing derpy pyramids
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 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