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
Empty file added LAP_FUNCTIONS_101.py
Empty file.
16 changes: 16 additions & 0 deletions bonus.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
def pattern_as_string(n: int) -> str:
"""
Completed the bonus requirements:
"""
result = ""

for i in range(n, 0, -1):
for j in range(i, 0, -1):
result += str(j) + " "
result += "\n"

return result
pattern = pattern_as_string(5)
print(pattern)

print(pattern_as_string.__doc__)