8000 Print Pattern of Reverse Pyramid or Reverse Triangle · avinashn/programminginpython.com@9d1b302 · GitHub
[go: up one dir, main page]

Skip to content

Commit 9d1b302

Browse files
committed
Print Pattern of Reverse Pyramid or Reverse Triangle
1 parent a0b39dc commit 9d1b302

File tree

1 file changed

+13
-0
lines changed

1 file changed

+13
-0
lines changed

patterns/ReversePyramid.py

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
__author__ = 'Avinash'
2+
3+
# Print a Reverse Pyramid
4+
5+
# Range of the Reverse Pyramid
6+
num = int(input("Enter the range: \t "))
7+
8+
for rows in range(num, 0, -1):
9+
for columns in range(0, num-rows):
10+
print(end=" ")
11+
for columns in range(0, rows):
12+
print("*", end=" ")
13+
print()

0 commit comments

Comments
 (0)
0