Skip to content

Commit 01422d6

Browse files
authored
Create numericpattern148.py
1 parent 5a895d9 commit 01422d6

File tree

1 file changed

+20
-0
lines changed

1 file changed

+20
-0
lines changed

Numeric Patterns/numericpattern148.py

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
height = int(input())
2+
3+
for i in range(1,height+1):
4+
5+
for j in range(1,i+1):
6+
print(i,end=" ")
7+
8+
for j in range(height-i,0,-1):
9+
print("*",end=" ")
10+
11+
print()
12+
13+
14+
# Sample Input :- 5
15+
# Output :-
16+
# 1 * * * *
17+
# 1 2 * * *
18+
# 1 2 3 * *
19+
# 1 2 3 4 *
20+
# 1 2 3 4 5

0 commit comments

Comments
 (0)