Python Program to Print Right Triangle of Consecutive Alphabets Pattern

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

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

print("====The Right Triangle of Consecutive Alphabets Pattern====")
alphabet = 65

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

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

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

print("====The Right Triangle of Consecutive Alphabets Pattern====")
alphabet = 65
i = 0

while(i < rows):
    j = 0
    while(j <= i):
        print('%c' %alphabet, end = ' ')
        alphabet = alphabet + 1
        j = j + 1
    print()
    i = i + 1
Enter Right Triangle Consecutive Alphabets Rows = 11
====The Right Triangle of Consecutive Alphabets Pattern====
A 
B C 
D E F 
G H I J 
K L M N O 
P Q R S T U 
V W X Y Z [ \ 
] ^ _ ` a b c d 
e f g h i j k l m 
n o p q r s t u v w 
x y z { | } ~ 

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.