Python Program to Print Right Triangle of Incremented Numbers

Write a Python program to print right triangle of incremented numbers pattern using for loop.

rows = int(input("Enter Right Triangle of Incremented Numbers Rows = "))

print("====Right Angled Triangle of Incremented Numbers Pattern====")

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

This python example prints the incremented numbers in right triangle pattern using a while loop.

rows = int(input("Enter Right Triangle of Incremented Numbers Rows = "))

print("====Right Angled Triangle of Incremented Numbers Pattern====")
i = 1
while(i <= rows):
    j = i
    while(j >= 1):
        print(j, end = ' ')
        j = j - 1
    print()
    i = i + 1
Enter Right Triangle of Incremented Numbers Rows = 12
====Right Angled Triangle of Incremented Numbers Pattern====
1 
2 1 
3 2 1 
4 3 2 1 
5 4 3 2 1 
6 5 4 3 2 1 
7 6 5 4 3 2 1 
8 7 6 5 4 3 2 1 
9 8 7 6 5 4 3 2 1 
10 9 8 7 6 5 4 3 2 1 
11 10 9 8 7 6 5 4 3 2 1 
12 11 10 9 8 7 6 5 4 3 2 1 

About Suresh

Suresh is the founder of TutorialGateway and a freelance software developer. He specialized in Designing and Developing Windows and Web applications. The experience he gained in Programming and BI integration, and reporting tools translates into this blog. You can find him on Facebook or Twitter.