Skip to content

Commit 719d67a

Browse files
authored
Create pyramidpattern81.py
1 parent 81a2773 commit 719d67a

File tree

1 file changed

+23
-0
lines changed

1 file changed

+23
-0
lines changed

Pyramid Patterns/pyramidpattern81.py

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

0 commit comments

Comments
 (0)