Skip to content

Commit 23efbf6

Browse files
authored
Create pyramidpattern80.py
1 parent 719d67a commit 23efbf6

File tree

1 file changed

+21
-0
lines changed

1 file changed

+21
-0
lines changed

Pyramid Patterns/pyramidpattern80.py

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

0 commit comments

Comments
 (0)