Python Program to Print Inverted Right Triangle of Decreasing Order Numbers

Write a Python program to print the inverted right triangle of decreasing order numbers pattern using for loop.

rows = int(input("Inverted Right Triangle Numbers in Decreasing Ord Rows = "))

print("==Inverted Right Triangle of Numbers in Decreasing Order Pattern==")

for i in range(rows, 0, -1):
    for j in range(i, 0, -1):
        print(j, end = ' ')
    print()
Python Program to Print Inverted Right Triangle of Decreasing Order Numbers

This Python example prints the inverted right triangle of numbers in decreasing order using a while loop.

rows = int(input("Inverted Right Triangle Numbers in Decreasing Ord Rows = "))

print("==Inverted Right Triangle of Numbers in Decreasing Order Pattern==")

i = rows

while(i >= 1):
    j = i
    while(j >= 1):
        print(j, end = ' ')
        j = j - 1
    print()
    i = i - 1
Inverted Right Triangle Numbers in Decreasing Ord Rows = 12
==Inverted Right Triangle of Numbers in Decreasing Order Pattern==
12 11 10 9 8 7 6 5 4 3 2 1 
11 10 9 8 7 6 5 4 3 2 1 
10 9 8 7 6 5 4 3 2 1 
9 8 7 6 5 4 3 2 1 
8 7 6 5 4 3 2 1 
7 6 5 4 3 2 1 
6 5 4 3 2 1 
5 4 3 2 1 
4 3 2 1 
3 2 1 
2 1 
1