Created
June 16, 2017 16:10
-
-
Save mllopart/3e0100fc67e5bc5cc5a7924a9a1074cf to your computer and use it in GitHub Desktop.
Staircase Hackerrank test
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
#!/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