Skip to content

Instantly share code, notes, and snippets.

@mllopart
Created June 16, 2017 16:10
Show Gist options
  • Save mllopart/3e0100fc67e5bc5cc5a7924a9a1074cf to your computer and use it in GitHub Desktop.
Save mllopart/3e0100fc67e5bc5cc5a7924a9a1074cf to your computer and use it in GitHub Desktop.
Staircase Hackerrank test
#!/bin/python3
'''
Consider a staircase of size n=4:
#
##
###
####
Observe that its base and height are both equal to , and the image
is drawn using # symbols and spaces. The last line is not preceded by any spaces.
'''
import sys
n = int(input().strip())
for i in range(1,n+1):
countNum = n-i
print((' '*countNum)+('#'*i))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment