Answer to Question #313111 in Python for gopi chand

Question #313111

for example sample input= 4 , print right angle trangle in numbers like ,reverse order

1

121

12321

1234321

like this can solve this for mee ?


1
Expert's answer
2022-03-17T15:18:40-0400
input1 = int(input(''))
k = 0
for i in range(1,input1+1):
    for j in range(1,i+k):
        print(j, end=' ')
    k = k + 2
    print()
    

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

No comments. Be the first!

Leave a comment

LATEST TUTORIALS
New on Blog
APPROVED BY CLIENTS