Skip to content

Commit ad8e536

Browse files
authored
Create numericpattern183.py
1 parent 9e48a8b commit ad8e536

File tree

1 file changed

+21
-0
lines changed

1 file changed

+21
-0
lines changed

Numeric Patterns/numericpattern183.py

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

0 commit comments

Comments
 (0)