Skip to content

Commit 8fe9523

Browse files
authored
Create pyramidpattern66.py
1 parent 2c62e36 commit 8fe9523

File tree

1 file changed

+25
-0
lines changed

1 file changed

+25
-0
lines changed

Pyramid Patterns/pyramidpattern66.py

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

0 commit comments

Comments
 (0)