Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 10 additions & 0 deletions integer_stairs.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
def int_number(x:int):
''' this function takes an integer and draw stairs shape with it numbers '''
while x != 0:
for i in range(x,0,-1):
print(i, end=" ")
print("")
x -= 1

int_number(5)
print(int_number.__doc__)
13 changes: 13 additions & 0 deletions return_of_the_stairs.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
def int_number(x:int):
''' this function takes an integer and draw stairs shape with it numbers '''
string:str = ""
while x != 0:
for i in range(x,0,-1):
string += str(i) + " "
string += "\n"
x -= 1
return string

variable = int_number(5)
print(variable)
print(int_number.__doc__)