Skip to content

Commit b4ca5d3

Browse files
authored
Create pattern3
A simple pyramid of numbers
1 parent 9347074 commit b4ca5d3

File tree

1 file changed

+24
-0
lines changed

1 file changed

+24
-0
lines changed

pattern3

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
#Simple number triangle piramid
2+
#1
3+
#22
4+
#333
5+
#4444
6+
#55555
7+
#666666
8+
9+
10+
11+
12+
def main():
13+
lines = int(input("Enter no.of lines: "))
14+
pattern(lines)
15+
16+
def pattern(lines):
17+
t = 1
18+
for i in range(1, (lines +1)):
19+
format = str(t)*i
20+
print(format)
21+
t = t + 1
22+
23+
if __name__ == "__main__":
24+
main()

0 commit comments

Comments
 (0)