Skip to content

Commit 4757c3b

Browse files
authored
Create reversed_pattern3.py
1 parent f118886 commit 4757c3b

File tree

1 file changed

+20
-0
lines changed

1 file changed

+20
-0
lines changed

reversed_pattern3.py

+20
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
#Simple inverted number triangle piramid
2+
#11111
3+
#2222
4+
#333
5+
#44
6+
#5
7+
8+
def main():
9+
lines = int(input("Enter no.of lines: "))
10+
pattern(lines)
11+
12+
def pattern(lines):
13+
t = 1
14+
for i in reversed(range(1, (lines +1))):
15+
format = str(t)*i
16+
print(format)
17+
t = t + 1
18+
19+
if __name__ == "__main__":
20+
main()

0 commit comments

Comments
 (0)