Python Program to Print Right Triangle Alphabets Pattern

Write a Python program to print right triangle alphabets pattern or right angled triangle pattern of alphabets using for loop.

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

print("====Right Angled Triangle Alphabets Pattern ====")

alphabet = 65

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

This Python example prints the alphabets in the right angled triangle pattern using a while loop.

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

print("====Right Angled Triangle Alphabets Pattern ====")

alphabet = 65
i = 0

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