Question #237072

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

N = 4


Expert's answer

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!

LATEST TUTORIALS
APPROVED BY CLIENTS