Created
September 16, 2023 06:22
-
-
Save codeperfectplus/02b5ac5a02e481c604aa845bdd6700ab to your computer and use it in GitHub Desktop.
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
''' | |
Topic : Algorithms | |
Subtopic : StairCase | |
Language : Python | |
Problem Statement : Write a program that prints a staircase of size 'n'. | |
Url : https://www.hackerrank.com/challenges/staircase/problem | |
''' | |
#!/bin/python3 | |
import math | |
import os | |
import random | |
import re | |
import sys | |
# Complete the staircase function below. | |
def staircase(n): | |
for i in range(1, n + 1): | |
print(f'{"#"*i:>{n}}') | |
if __name__ == '__main__': | |
n = int(input()) | |
staircase(n) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment