Question #165273

Alphabetic Symbol

Write a program to print the right alphabetic triangle up to the given N rows.Input


The input will be a single line containing a positive integer (N).Output


The output should be N rows with letters.

Note: There is a space after each letter


.Explanation


For example, if the given number of rows is 4,

your code should print the following pattern.

A 
A B 
A B C 
A B C D

Expert's answer

n = int(input("Enter a positive integer: "))
for i in range(n+1):
    print()
    for j in range(65, 65 + i):
        print(chr(j),' ', end='')

Need a fast expert's response?

Submit order

and get a quick answer at the best price

for any assignment or question with DETAILED EXPLANATIONS!

LATEST TUTORIALS
APPROVED BY CLIENTS