Answer to Question #237072 in Python for jaswanth

Question #237072

Given a number N, write a program to print a triangular pattern of N lines with numbers as shown below.

N = 4


1
Expert's answer
2021-09-14T18:17:49-0400
N=4
for i in range(N):
    for j in range(i):
        print("*", end='')
    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