Write a Python program to print inverted right triangle of consecutive numbers in each row using for loop.
rows = int(input("Inverted Right Triangle Consecutive Row Numbers Rows = ")) print("==Inverted Right Triangle Consecutive Rows Numbers Pattern==") for i in range(rows, 0, -1): for j in range(1, i + 1): print(j, end = ' ') print()
This Python example prints the inverted right angled triangle of consecutive row numbers using a while loop.
rows = int(input("Inverted Right Triangle Consecutive Row Numbers Rows = ")) print("==Inverted Right Triangle Consecutive Rows Numbers Pattern==") i = rows while(i >= 1): j = 1 while(j <= i): print(j, end = ' ') j = j + 1 print() i = i - 1
Inverted Right Triangle Consecutive Row Numbers Rows = 12
==Inverted Right Triangle Consecutive Rows Numbers Pattern==
1 2 3 4 5 6 7 8 9 10 11 12
1 2 3 4 5 6 7 8 9 10 11
1 2 3 4 5 6 7 8 9 10
1 2 3 4 5 6 7 8 9
1 2 3 4 5 6 7 8
1 2 3 4 5 6 7
1 2 3 4 5 6
1 2 3 4 5
1 2 3 4
1 2 3
1 2
1