We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 24070ea + a19359f commit 33edbf8Copy full SHA for 33edbf8
Patterns/pattern5.py
@@ -6,19 +6,14 @@
6
#54321
7
8
def main():
9
- lines = int(input("Enter number of lines: "))
+ lines = int(input("Enter the number of lines: "))
10
pattern(lines)
11
12
def pattern(rows):
13
-
14
15
- for row in range(1, rows):
16
- for column in range(row, 0, -1):
17
- print(column, end=' ')
18
- print("")
19
20
21
+ for i in range(1, rows+1):
+ for j in range(i, 0, -1):
+ print(j, end="")
+ print()
22
23
if __name__ == "__main__":
24
- main()
+ main()
0 commit comments