Skip to content

Instantly share code, notes, and snippets.

@charles2588
Created July 7, 2016 14:50
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save charles2588/ae43c5b0a70eaca17140464d6a32d05f to your computer and use it in GitHub Desktop.
Save charles2588/ae43c5b0a70eaca17140464d6a32d05f to your computer and use it in GitHub Desktop.
https://repl.it/C9dx/0 created by charles2588
#Staircase builder
n=5
startforhash=n-1
str=""
for i in range(n):
for j in range(n):
if(j>=startforhash):
str+="#"
else:
str+=" "
print(str)
str=""
startforhash-=1
Python 3.5.1 (default, Dec 2015, 13:05:11)
[GCC 4.8.2] on linux
>>> #
##
###
####
#####
=> None
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment