Answer to Question #165273 in Python for teja

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
1
Expert's answer
2021-02-23T04:02:36-0500
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!

Comments

Assignment Expert
11.06.21, 14:06

Dear Teja Vuppala ,if you have serious assignment that requires large amount 

of work and hence cannot be done for free you can submit it as assignment and our 

experts will surely assist you.



Teja Vuppala
11.06.21, 12:18

when i run this program i am getting space with the outer loop of print function..i want to get an output with out blank space...

Leave a comment

LATEST TUTORIALS
New on Blog
APPROVED BY CLIENTS