Python Program to Print Inverted Triangle Alphabets Pattern

Write a Python program to print inverted triangle alphabets pattern using for loop.

rows = int(input("Enter Inverted Right Triangle Alphabets Pat Rows = "))

print("====Inverted Right Triangle Alphabets Pattern====")
alphabet = 65

for i in range(0, rows):
    for j in range(rows - 1, i - 1, -1):
        print('%c' %(alphabet + j), end = ' ')
    print()
Python Program to Print Inverted Triangle Alphabets Pattern

This Python example prints the inverted triangle pattern of alphabets using a while loop.

rows = int(input("Enter Inverted Right Triangle Alphabets Pat Rows = "))

print("====Inverted Right Triangle Alphabets Pattern====")
alphabet = 65
i = 0

while(i < rows):
    j = rows - 1
    while(j >= i):
        print('%c' %(alphabet + j), end = ' ')
        j = j - 1
    print()
    i = i + 1
Enter Inverted Right Triangle Alphabets Pat Rows = 14
====Inverted Right Triangle Alphabets Pattern====
N M L K J I H G F E D C B A 
N M L K J I H G F E D C B 
N M L K J I H G F E D C 
N M L K J I H G F E D 
N M L K J I H G F E 
N M L K J I H G F 
N M L K J I H G 
N M L K J I H 
N M L K J I 
N M L K J 
N M L K 
N M L 
N M 
N 

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.