Skip to content

Commit ec63ac2

Browse files
authored
Create pyramidpattern71.py
1 parent 8ec4204 commit ec63ac2

File tree

1 file changed

+26
-0
lines changed

1 file changed

+26
-0
lines changed
Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
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+
c = chr(height-i+64)
12+
print(c,end=" ")
13+
14+
else:
15+
print(height-i,end=" ")
16+
17+
print()
18+
19+
# Sample Input :- 5
20+
# Output :-
21+
# E E E E E
22+
# 4 4 4 4
23+
# C C C
24+
# 2 2
25+
# A
26+

0 commit comments

Comments
 (0)