Python Program to Print Downward Triangle Alphabets Pattern

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

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

print("====Downward Triangle Alphabets Pattern====")
alphabet = 65

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

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

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

print("====Downward Triangle Alphabets Pattern====")
alphabet = 65
i = rows - 1

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

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.