(b) Write a program which displays the following pattern as an output.
1
22
333
4444
55555
Answers
Answered by
0
Answer:
1-22-333-4444 Pattern
# 1-22-333-4444 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(i, end="")
print()
Output
Enter number of rows: 8
1
22
333
4444
55555
666666
7777777
88888888
Explanation:
Similar questions