Saved Bookmarks
| 1. |
Write a python program to print the following patienn-- the pattern will be-1 in the 1st line12 in the 2nd line123 in the 3rd line1234 in the 4th line12345 in the 5th line... |
|
Answer» ong>Explanation: # 1-12-123-1234 Pattern up to N lines n = int(INPUT("Enter number of rows: ")) for i in RANGE(1,n+1): for j in range(1, i+1): print(j, end="") print() OUTPUT : Enter number of rows: 6 Enter number of rows: 61 Enter number of rows: 6112 Enter number of rows: 6112123 Enter number of rows: 61121231234 Enter number of rows: 6112123123412345 Enter number of rows: 6112123123412345123456 I THINK THIS IS CORRECT |
|