Print the following pattern using for loops:
1
1 2
1 2 3
1 2 3 4
1 2 3 4 5
for r in range(2,7): line="" for c in range(1,r): line += str(c)+ " " print(line)
Need a fast expert's response?
and get a quick answer at the best price
for any assignment or question with DETAILED EXPLANATIONS!
Comments
Leave a comment