Skip to content

task level1 : Stairecase#11

Open
faimah57 wants to merge 1 commit intoProgramming-Club-IAU:masterfrom
faimah57:master
Open

task level1 : Stairecase#11
faimah57 wants to merge 1 commit intoProgramming-Club-IAU:masterfrom
faimah57:master

Conversation

@faimah57
Copy link

BRIFE
I made a program that only take a number from the user to implement to method that will print "*" as stairecase.

THE SAMPLE RUN
input is 5.
Screenshot 2024-02-12 233854

THE CODE TEXT
`#python code to print stairs based on the input

#function
def print_staircase(n):
for i in range(1, n + 1):
stars = '*' * i
print(stars)

#input with cheeking
n = int(input("Enter the number of rows for the staircase: "))
if n > 0:
print_staircase(n)
else:
print("Please enter a positive integer.")
`

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant